home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 6 / csr30_3.zip / CSPOTRUN.DOC
Text File  |  1988-07-13  |  269KB  |  8,973 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.         C Spot Run
  20.  
  21.         A User-Supported C Add-On Library
  22.  
  23.         Version 3.0
  24.  
  25.         July 12, 1988
  26.  
  27.  
  28.         Bob Pritchett
  29.         New Dimension Software
  30.  
  31.         23 Pawtucket Dr.
  32.         Cherry Hill, NJ 08003
  33.  
  34.  
  35.         Copyright 1986, 1987, 1988 Bob Pritchett
  36.         All Rights Reserved
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.                                  To Mom and Dad
  53.  
  54.                    Your time, effort, encouragement and advice
  55.                      have been far above and beyond what any
  56.                            son could dream of asking.
  57.  
  58.                                      and to
  59.  
  60.                                   The Memory of
  61.                                Thelma M. Pritchett
  62.  
  63.                         Your greatest works are the lives
  64.                             of everyone who knew you.
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.                                    Trademarks
  80.  
  81.          Microsoft C and QuickC are trademarks of Microsoft Corporation.
  82.             IBM-PC is a trademark of International Business Machines.
  83.               C Spot Run is a trademark of New Dimension Software.
  84.                 Turbo C is a trademark of Borland International.
  85.  
  86.  
  87.                                    Disclaimer
  88.  
  89.              This  library and all of its contents are provided "AS  IS."
  90.         No  warranty is expressed or implied.  Use of this library is  at
  91.         the  user's  own risk,  and the authors are not  liable  for  any
  92.         damages  or loss of profits resulting from the use of the library
  93.         or its documentation.
  94.                           C Spot Run - Documentation
  95.  
  96.  
  97.  
  98.                                 Table of Contents
  99.  
  100.             Dedication...............................................  2
  101.             Trademarks...............................................  2
  102.             Disclaimer...............................................  2
  103.  
  104.          1. Introduction.............................................  5
  105.             1.1. What is C Spot Run?.................................  5
  106.             1.2. Why C Spot Run?.....................................  5
  107.  
  108.          2. Obtaining and Copying C Spot Run.........................  6
  109.             2.1. User Supported Software.............................  6
  110.             2.2. Ownership of C Spot Run.............................  6
  111.             2.3. Contents of C Spot Run..............................  6
  112.             2.4. License for C Spot Run..............................  6
  113.             2.5. Using C Spot Run in a Commercial Application........  7
  114.  
  115.          3. Using the C Spot Run Library.............................  8
  116.             3.1. Using the Library with Microsoft C v5.x / QuickC....  8
  117.             3.2. Using the Library with Turbo C v1.5.................  8
  118.             3.3. Using the Utilities and Aids........................  9
  119.             3.4. Using the Source Code...............................  9
  120.  
  121.          4. Format of Routine/Utility Descriptions................... 10
  122.             4.1. How to Use Routine Description Pages................ 10
  123.             4.2. How to Use Utility Decription Pages................. 10
  124.  
  125.          5. The Library Routine Descriptions.........................
  126.             5.1. General Descriptions of Related Routines............
  127.                  5.1.1. Date Manipulation Routines...................
  128.                  5.1.2. Directory Management Routines................
  129.                  5.1.3. Graphics Routines............................
  130.                  5.1.4. Input Routines...............................
  131.                  5.1.5. Printer Operation Routines...................
  132.                  5.1.6. Real Time Timers.............................
  133.                  5.1.7. Sound Routines...............................
  134.                  5.1.8. Window Function Library......................
  135.             5.2. Individual Routine Descriptions.....................
  136.  
  137.          6. Utility and Aid Descriptions.............................
  138.  
  139.          7. Header File Descriptions.................................
  140.  
  141.          8. Appendix A - Updating the Library........................
  142.  
  143.          9. Appendix B - Contacting Authors..........................
  144.  
  145.         10. Appendix C - Submitting Routines or Utilities............
  146.  
  147.         11. Appendix D - Library History and Changes.................
  148.  
  149.         12. Appendix E - ASCII Table.................................
  150.  
  151.         13. Appendix F - Window Border Characters....................
  152.  
  153.  
  154.                                                            Page 3
  155.                           C Spot Run - Documentation
  156.  
  157.  
  158.  
  159.         14. Quick Reference Chart....................................
  160.  
  161.         15. Commonly Asked Questions and Answers.....................
  162.  
  163.         16. Routine/Utility Submission Form..........................
  164.  
  165.         17. User Response Form.......................................
  166.  
  167.         18. Order Form...............................................
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.                                                            Page 4
  216.                           C Spot Run - Documentation
  217.  
  218.  
  219.         1. Introduction
  220.  
  221.            1.1.  What is C Spot Run?
  222.  
  223.              C  Spot  Run is a library of C and Assembly routines  for  C
  224.         programmers.   These  routines supplement the standard  libraries
  225.         provided  with  compilers,  and  provide  tools  for  specialized
  226.         applications.
  227.              All routines in this library are either in the public domain
  228.         or  are  part of the user supported software world,  as  are  the
  229.         accompanying utilities and programming aids.
  230.              Our  goal  is  to  provide low  cost  (free!)  routines  and
  231.         utilities  for  C programmers.   The use of pre-written  routines
  232.         greatly reduces the amount of tedious code writing in almost  any
  233.         situation, and we hope that our collection will prove to do so.
  234.  
  235.            1.2.  Why C Spot Run?
  236.  
  237.              What  is  probably the next question to cross your  mind  is
  238.         simply,  why?   Good question,  and I hope this is a good answer.
  239.         Because.   Because  there  are so many libraries similar to  this
  240.         one.  Because they all cost money, and this one doesn't.  Because
  241.         as of yet there is no central distribution point for many of  the
  242.         C routines floating around in .C files everywhere.   We feel that
  243.         C Spot Run is filling a need, and we hope you agree with us.
  244.              We  would  appreciate your taking some time to let  us  know
  245.         what you think of the library and what directions you would  like
  246.         to see it take.
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.                                                            Page 5
  277.                           C Spot Run - Documentation
  278.  
  279.  
  280.         2. Obtaining and Copying C Spot Run
  281.  
  282.            2.1. User Supported Software
  283.  
  284.              User  supported software is software distributed at no  cost
  285.         other  then a small media charge with the expectation that  those
  286.         who   find  it  useful  will  send  a  donation  to  support  the
  287.         development.    In   most  cases  those  who  contribute   become
  288.         registered users and receive automatic updates,  printed manuals,
  289.         telephone support, and/or source code.
  290.  
  291.            2.2. Ownership of C Spot Run
  292.  
  293.              Without  a major essay on copyright laws, the  routines  and
  294.         utilities  in  this  package are the property  of  New  Dimension
  295.         Software.   The few routines that were extracted from the  public
  296.         domain have been modified and those contributed by other  authors
  297.         have  been  released  to NDS for inclusion  in  this  copyrighted
  298.         package.
  299.              New  Dimension  Software,  and thus  this  library  and  all
  300.         accompanying  materials, is the property of Bob  Pritchett.  This
  301.         package is released for distribution under the limited license in
  302.         section 2.4.
  303.  
  304.            2.3. Contents of C Spot Run
  305.  
  306.              The  very  basic  principle  behind this  library  is  user-
  307.         supported software.   In addition to monetary  contributions,  an
  308.         even  more valuable form is that of routines or utilities.   Most
  309.         of the routines and utilities in this library were written by two
  310.         or  three people,  or are modifications of other routines in  the
  311.         public domain.
  312.              We would like to build a sizable library of tools and  helps
  313.         for C programmers,  and whether it is a new routine you wrote, or
  314.         one that is already in the public domain world, your contribution
  315.         of  code  and permission to let us use it would  be  appreciated.
  316.         For  practical purposes, however, we can only  use  contributions
  317.         that are public domain or are released to New Dimension  Software
  318.         for inclusion in CSR under its copyright.  (Credit for authorship
  319.         will be made in the documentation and source code.)
  320.  
  321.            2.4. Distribution License for C Spot Run
  322.  
  323.              The  C  Spot Run library of routines and  utilities  may  be
  324.         freely duplicated and distributed under the following terms:
  325.  
  326.  
  327.              o  No fee may be charged other than  reasonable expenses for
  328.         media and reproduction, no more then eight dollars.
  329.  
  330.              o   The  library  MAY NOT be distrbuted  by  any  for-profit
  331.         corporation,  including,  but  not limited to,  for-profit public
  332.         domain software companies, without the express written permission
  333.         of Bob Pritchett.
  334.  
  335.  
  336.  
  337.                                                            Page 6
  338.                           C Spot Run - Documentation
  339.  
  340.  
  341.              o  The routines,  utilities, and documentation are not to be
  342.         distributed in a modified form.
  343.  
  344.              o   Credit must be given to New Dimension Software when  CSR
  345.         routines  are  used in any distributed application, in  both  the
  346.         code and program documentation.
  347.  
  348.            2.5. Using C Spot Run in a Commercial Application
  349.  
  350.              You  are  free  to use parts of C Spot Run in  a  commercial
  351.         application,  on the following conditions:   You must purchase  a
  352.         copy  of the source code to C Spot Run at the commercial  license
  353.         fee  ($75),  becoming a registered user.   You may not distribute
  354.         any  part  of C Spot Run in a humanly readable  form.   You  must
  355.         include  the following statement in your application source  code
  356.         and  documentation:   "Portions of this program  Copyright  1986,
  357.         1987  New  Dimension  Software."   Additionally,   New  Dimension
  358.         Software  must  be notified of any commercial  programs  released
  359.         using the C Spot Run library.
  360.              These conditions are meant for my protection, curiosity, and
  361.         to assure that my work isn't used without credit.   If you have a
  362.         difficulty with any of them,  please contact me and we can try to
  363.         work something out.   (Along the lines of my curiosity,  I  would
  364.         like  to  see how the library is put to use,  and if you want  to
  365.         send me a copy of the programs you write with it, I won't mind.)
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.                                                            Page 7
  399.                           C Spot Run - Documentation
  400.  
  401.  
  402.         3. Using the C Spot Run Library
  403.  
  404.            3.1. Using the Library with Microsoft C v5.x / QuickC
  405.  
  406.              C Spot Run works with all versions of Microsoft C and QuickC
  407.         from  versions  5.0 and 1.0 up, respectively.   Included  in  the
  408.         distribution package are both small and medium model versions  of
  409.         the compiled library, in the files CSRQCS.LIB and CSRQCM.LIB.
  410.              To  use  CSR  with a command line  version  of  a  Microsoft
  411.         compiler  (CL or QCL) simply add the library name to the  end  of
  412.         the compile line.  The following two examples compile TEST.C with
  413.         MSC  5.x  in the medium memory model and with QuickC 1.x  in  the
  414.         small:
  415.  
  416.                 cl -AM test.c csrqcm.lib
  417.                 qcl test.c csrqcs.lib
  418.  
  419.              In order to compile an application with CSR from within  the
  420.         QuickC  integrated environment it is neccessary to create a  make
  421.         file.   This can be done from within QuickC by selecting the  Set
  422.         Program  List  command  from the File menu and  adding  both  the
  423.         source  file and library names to the .MAK file  QuickC  creates.
  424.         You  can  then compile the application using its make  file  from
  425.         both within and without the integrated environment.  (The command
  426.         MAKE test.mak would compile the application from the DOS  command
  427.         line.)   When using the integrated environment please be sure  to
  428.         set the compiler option to .EXE, NOT memory output.  (This  means
  429.         you  will need to use the DOS Shell option to test your  compiled
  430.         program,  not the QuickC Run command.)  For more information  see
  431.         Chapter 6 of the Microsoft QuickC Programmer's Guide.
  432.  
  433.              Both  a  batch  and make file for the  CSRDEMO  program  are
  434.         included with C Spot Run.
  435.  
  436.            3.2. Using the Library with Turbo C v1.5
  437.  
  438.              C  Spot  Run is provided for use with Turbo C  v1.5  in  the
  439.         small  memory model.  The library is contained in TCSCSR.LIB  and
  440.         works with both the command line and integrated version of  Turbo
  441.         C.
  442.              To  use CSR with the command line version simply add  it  to
  443.         the TCC compile line, as demonstrated below:
  444.  
  445.                 tcc test.c tcscsr.lib
  446.  
  447.              In  order to use it from within the  integrated  environment
  448.         you  must  create  a  Project  Make  file  containing  both   the
  449.         application source file names and the complete library file name.
  450.         The  application  can then be built from the Compile  menu.   For
  451.         more information consult your Turbo C User's Guide.
  452.  
  453.              Both  a batch and Project Make file for the CSRDEMO  program
  454.         are included with C Spot Run.
  455.  
  456.  
  457.  
  458.  
  459.                                                            Page 8
  460.                           C Spot Run - Documentation
  461.  
  462.  
  463.            3.3. Using the Utilities and Aids
  464.  
  465.              The  use of utilities and programming aids should be clearly
  466.         described on their description pages.   All include files  should
  467.         be  included at the beginning of sources that need them,  and  in
  468.         addition  to the description page most independant utilities will
  469.         provide  a  short summary of their use when run with  no  command
  470.         line parameters.
  471.  
  472.            3.4. Using the Source Code
  473.  
  474.              Users who purchase the source code will additionally receive
  475.         make  files  to recompile the Microsoft  and  Borland  libraries.
  476.         These  make  files  provide for  easy  library  maintenance  when
  477.         changes  are made to the source and allow for easy  recompilation
  478.         for any memory model.  The source code itself detects at  compile
  479.         time  the  current  compiler  and  memory  model  and  uses   the
  480.         preprocessor to make any neccessary changes.
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.                                                            Page 9
  521.                           C Spot Run - Documentation
  522.  
  523.  
  524.         4. Format of Routine/Utility Descriptions
  525.  
  526.            4.1. How to Use the Routine Description Pages
  527.  
  528.              The  routine  description pages are set up in such a  manner
  529.         that  updates  to  the library will not  require  a  totally  new
  530.         manual.
  531.              Each  routine has its own full page regardless of how  small
  532.         or large it is.  The page is set up in a special order, with  the
  533.         name of the routine on the upper right of the page at the top for
  534.         quick  indexing,  followed by a short summary  of  the  necessary
  535.         arguments  and their data types.  Next is a line  containing  the
  536.         creation  and last update dates, and then the author's  name  and
  537.         the  name of the source code file.  Following these is a list  of
  538.         the  files  in  which  the code is contained,  a  list  of  other
  539.         required  functions that may not be in every library, and then  a
  540.         paragraph  description of the function.  This is followed with  a
  541.         paragraph  explaining  the  return  value,  a  list  of   related
  542.         functions in the library, and a final example of how it might  be
  543.         used in a portion of code.
  544.              It  is  recommended that you keep the complete manual  in  a
  545.         three  ring binder,  and as you receive updates simply print  out
  546.         the enclosed page,  and insert it in alphabetical order among the
  547.         function  description pages.   (This manual may seem like a waste
  548.         of paper, but this way it saves a lot in the long run.)
  549.  
  550.            4.2. How to Use the Utility Description Pages
  551.  
  552.              The  utility  description pages are similar to  the  routine
  553.         descriptions   described   above  except  for   the   layout   of
  554.         information.  On the utility description pages the first item is,
  555.         as  with the routine descriptions,  the utility name on the upper
  556.         right  hand corner.   Next is a summary of the utility  including
  557.         the creation and last update dates, the author's name, the source
  558.         language,  and then a copy of the documentation, usually an exact
  559.         duplicate of whatever documentation the author has sent.
  560.              As  mentioned,  the  method for updating  these  description
  561.         pages is the same as above in section 4.1.
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.                                                            Page 10
  582.  
  583.  
  584.  
  585.                            Date Manipulation Routines
  586.  
  587.              This  library  comes with a variety of routines that can  be
  588.         used to perform operations on and manipulate dates.
  589.              When  calling functions that require date elements the order
  590.         of month,  day,  and year is used.   The only exceptions to  this
  591.         ordering are the get_date() and set_date() functions,  which work
  592.         with  the  system's internal date.   These routines  require  the
  593.         arguments to be in the order of day, month, and year.
  594.              All  of  the  date  manipulation  routines  are  capable  of
  595.         accepting  years  in both the two and four digit  formats.   (IE.
  596.         1987 is evaluated in the same manner as is 87.)
  597.              The number of days between two given dates can be calculated
  598.         directly with the dt_diff() routine, or through subtraction using
  599.         the serial numbers of each date, as calculated with date_sn().
  600.              At  present  the  date routines do  not  take  into  account
  601.         different calendar systems,  and,  with the exception of the year
  602.         limited  serial number routines,  will assume all AD dates are in
  603.         our current system.
  604.  
  605.  
  606.  
  607.                           Directory Management Routines
  608.  
  609.              With the two basic file search routines ffirst() and fnext()
  610.         any  number  of directories may be generated,  and when  combined
  611.         with the windowing routines any application can have a convenient
  612.         system for directory viewing and file selection.
  613.              The possibilities are endless, thus only a limited number of
  614.         directory viewing routines have been provided,  but we trust that
  615.         they will help you design and implement whatever file  management
  616.         you require.  The following are some hints and suggestions:
  617.  
  618.              Finding  and  storing all the file names  before  displaying
  619.         them has the benefit of allowing scrolling to take place forwards
  620.         and back, but the disadvantage of a slight delay while reading in
  621.         the information.  If scrolling is needed, try saving the names as
  622.         they  are read and displayed,  and keep pointers allowing you  to
  623.         scroll back, but not forward until the new file names are read.
  624.  
  625.              If  it  is neccessary to divide the file name and  extension
  626.         two obvious alternatives are presented.   Either write a  routine
  627.         to go through the string containing the name, looking for the dot
  628.         separater,  and  split  the  string into two parts,  or  use  the
  629.         sscanf() function to read the two fields into separate strings.
  630.  
  631.              Whatever you do with the provided directory  routines,  we'd
  632.         appreciate  a copy of your routine for curiosity's sake,  and  if
  633.         possible, inclusion in a future version of the library.
  634.  
  635.  
  636.  
  637.                                 Graphics Routines
  638.  
  639.              This  version  of  the library contains just  a  few  simple
  640.         graphics  primitives  that work with the Color Graphics  Adapter.
  641.         The  routines provided perform simple graphics functions with  no
  642.         concern for the aspect ratio of the screen, relative coordinates,
  643.         etc.   All of the functions work with the exact coordinates given
  644.         and  mathamaticly  calculated assuming an aspect  ratio  of  one.
  645.         (The IBM PC has a ratio of 1.2.)
  646.              The purpose of these routines is to provide a very few basic
  647.         routines  for  some  form  of graphics output.   If  you  have  a
  648.         complete  graphics system,  or just one that's faster  than  that
  649.         provided  here,  we  would  appreciate it if you  would  consider
  650.         submitting a copy to the library.
  651.  
  652.              Considering  that  both Microsoft and Borland  provide  very
  653.         complete  graphics libraries the functions in CSR  are  virtually
  654.         useless, except for their value as small and relatively  standard
  655.         functions.   The only possible future for graphics as a  part  of
  656.         CSR  is the addition of a compiler independent interface for  the
  657.         graphic  libraries and/or a set of sophisticated graphic  display
  658.         tools.   These tools would be valuable additions, but are  beyond
  659.         the current plans for NDS development.
  660.  
  661.  
  662.  
  663.                                  Input Routines
  664.  
  665.  
  666.              The input routines are named in the following format:
  667.  
  668.              [w][f]inpt<type>[r][m][e][d]();
  669.  
  670.                   [w]       Window.  If input is in a window, use the [w]
  671.         prefix.   NOTE:   If  the window pointer given is not to a  valid
  672.         window the result is undefined.
  673.  
  674.                   [f]        Field.   Field input is input in  a  maximum
  675.         length  field.   The  color and fill character for the  field  is
  676.         specified by fcolor() and fchar().
  677.  
  678.                   <type>     Type.   This mandatory part of the  function
  679.         name is the type of input being accepted.
  680.  
  681.                   [r]        Range.   If  there is a minimum and  maximum
  682.         entry this element is used in the name.
  683.  
  684.                   [m]       Mask.   This element means that an input mask
  685.         will be specified.
  686.  
  687.                   [e]       Editing.   If the field supports full editing
  688.         features, this element is used.
  689.  
  690.                   [d]       Default.   If there is to be a default  entry
  691.         this element is used.
  692.  
  693.  
  694.              All  of these elements make for a large number  of  possible
  695.         routines.   However, only a few of these options are implemented,
  696.         and  users who have source code can use these functions as  bases
  697.         for  new  ones.    For  a  list  of  which  functions  have  been
  698.         implemented  with this version,  please check the quick reference
  699.         chart at the end of the manual.
  700.  
  701.  
  702.  
  703.                            Printer Operation Routines
  704.  
  705.              The printer output routines included in this verson, 1.0, of
  706.         the  library are intended to provide only the basics for  printer
  707.         control.   The  routines  provide  for single  character  output,
  708.         lputchar(), string output, lprint(), and formatted string output,
  709.         lprintf().
  710.  
  711.              These  routines all call DOS function number 5  which  means
  712.         that with the DOS MODE command etc.  the output can be redirected
  713.         or reformatted.
  714.  
  715.              Many  libraries include an extensive set of routines to  set
  716.         different attributes,  fonts,  and styles on printers.   However,
  717.         since  these routines are usually dependant on one printer  make,
  718.         and  generaly do little more then output two or three  characters
  719.         it  was  thought  best  to provide only  the  generic  lputchar()
  720.         function.  If you would like to provide a set of printer specific
  721.         or  independant  routines  to  perform  these  functions,  please
  722.         contact us.
  723.  
  724.  
  725.  
  726.                                 Real Time Timers
  727.  
  728.              The  timer  functions are designed to implement  up  to  ten
  729.         different elapsed time counters.   The counters are numbered from
  730.         zero to nine, each of which may be individually started, stopped,
  731.         and  read.   The function init_tmr() must be called before any of
  732.         the timers are used, although it needs to be called only once.
  733.  
  734.              These   ten   counters  may  prove  especially   useful   in
  735.         communications,  timed input,  or other 'real time'  applications
  736.         due to the fact that they work with the internal system clock and
  737.         are  not bus clock rate dependant.   (The timer() routine,  not a
  738.         part of this collection, does report in clock ticks.)
  739.  
  740.              All of the timer functions, with the exception of init_tmr()
  741.         and  get_timer(),  require a single integer argument with a value
  742.         between zero and nine.  Any other value will normalized into that
  743.         range, which is the timer to use for that specific function call.
  744.         The  functions  that  return a time do so in tenths  of  seconds.
  745.         (The  maximum  time  any timer may  track  is  approximately  1.8
  746.         hours.)
  747.  
  748.              These  routines  were contributed by Dave Perras  who  wrote
  749.         them  with  a  Datalight C compiler.   The included  source  code
  750.         should be easily portable to most MS-DOS C compilers.
  751.  
  752.  
  753.  
  754.                                  Sound Functions
  755.  
  756.              The sound functions provided with C Spot Run can be used  to
  757.         make sound 'while you wait' or in an interrupt driven  background
  758.         mode.
  759.              The  sound() function will play the note given for the  time
  760.         specified  and return when complete, or, in background mode,  put
  761.         the  note into the sound buffer and return immediately.  (If  the
  762.         buffer is full, sound() will wait until there is room.)
  763.              The  play() function uses the sound() function and  whatever
  764.         mode it is set to.
  765.  
  766.              Background mode is set by calling the sound_init() function,
  767.         and  terminated  by calling sound_done().  It is  VERY  important
  768.         that  sound_done() is called before any program terminates.   The
  769.         sound_quiet()   and  sound_left()  functions  can  be  used   for
  770.         manipulation of the background sound buffer.
  771.  
  772.              The  spkr_<on|off|freq>()  functions  directly  control  the
  773.         speaker.   A  frequency  can  be  loaded  with  the   spkr_freq()
  774.         function, started with the spkr_on() function, and stopped by the
  775.         spkr_off() function.
  776.  
  777.         NOTE:  As  of  this release background sound  is  NOT  supported.
  778.         Considering the importance of releasing the package ASAP and  the
  779.         difficulty  of  rewriting  the interrupt  handling  for  the  new
  780.         compilers and memory models the feature was temporarily disabled.
  781.         The sound() function behaves as noted, however it does not return
  782.         until  the  note is completed.  All  background  sound  functions
  783.         simply return without doing anything.
  784.  
  785.         If  you are interested in the restoration of background sound  to
  786.         the  CSR library, please make a request, otherwise the task  will
  787.         retain its low priority level.
  788.  
  789.         NOTE:   Turbo  C  v1.5  has  a  sound()  function  that   behaves
  790.         differently  than CSR's.  You should use function  provided  with
  791.         the  compiler  if you use Turbo C; the CSR sound()  function  has
  792.         been disabled in the Turbo C version of the library.
  793.  
  794.  
  795.  
  796.                              Window Function Library
  797.  
  798.              The  C  Spot  Run window function library is  a  library  of
  799.         routines that perform background/foreground windowing.  What this
  800.         means  is  that any window that is overlapped by another  window,
  801.         when  addressed  for output,  will be moved to the front  of  the
  802.         'stack' and become the active window.
  803.  
  804.              The  window library also contains a large number of  support
  805.         routines  to  make movement of and output to windows as  easy  as
  806.         possible.   There  are routines that make  pop-up  menus,  center
  807.         text,  draw  boxes,  and  do much more.   Full color  support  is
  808.         available,  and  for speed all of the cursor and output functions
  809.         are in assembly.
  810.  
  811.              All  windowing functions are in the  file  COUTPUT.C,  and
  812.         source is not distributed.
  813.  
  814.              For  ease  of calling,  in general you will  find  that  all
  815.         window  functions  are  preceeded by a w in  the  function  name,
  816.         (wopen(), wclose(), etc.) and in most cases the first argument is
  817.         the window pointer.
  818.  
  819.              For   more  information,   consult  the  detailed   function
  820.         descriptions.
  821.  
  822.              I would like to thank Philip A. Mongelluzo whose Windows for
  823.         C  and  Window BOSS packages were of invaluable use to me in  the
  824.         development  of this package,  not to mention the time  he  spent
  825.         patiently answering my questions.
  826.  
  827.  
  828.  
  829.                                                                 beep
  830.         Summary:
  831.  
  832.         void beep();
  833.  
  834.         Created: 07/02/87        Last Updated: 07/12/88
  835.  
  836.         Author: Bob Pritchett    Source File: CSRBEEP.C
  837.  
  838.         Requires: sound()
  839.  
  840.         Description:
  841.  
  842.         This  function outputs a 'less offensive' beep than the  standard
  843.         Control-G beep.  Additionally you can change the tone and length,
  844.         with the setbeep() function.  (Note:  All 'beeping' by other  CSR
  845.         functions is now done with this function.)
  846.  
  847.         See Also:
  848.  
  849.         setbeep() sound()
  850.  
  851.         Example:
  852.  
  853.         /* ... */
  854.            else                         /* If not acceptable input... */
  855.               beep();                   /* beep to indicate error. */
  856.         /* ... */
  857.  
  858.  
  859.  
  860.                                                               border
  861.         Summary:
  862.  
  863.         void border(color);
  864.         int color;               /* Color of Border */
  865.  
  866.         Created: 12/28/85        Last Updated: 07/12/88
  867.  
  868.         Author: Bob Pritchett    Source File: BORDER.ASM
  869.  
  870.         Requires: Nothing.
  871.  
  872.         Description:
  873.  
  874.         This function draws sets the screen border to the specified color
  875.         using function 11 of the BIOS video interrupt.
  876.  
  877.         Works in text modes only.
  878.  
  879.         See Also:
  880.  
  881.         ccls()
  882.  
  883.         Example:
  884.  
  885.         border(4);          /* Red Border */
  886.  
  887.  
  888.  
  889.                                                                  box
  890.         Summary:
  891.  
  892.         void box(x,y,x2,y2,type);
  893.         int x;                   /* Upper Left Row */
  894.         int y;                   /* Upper Left Col */
  895.         int x2;                  /* Lower Right Row */
  896.         int y2;                  /* Lower Right Col */
  897.         int type;                /* Style of Border */
  898.  
  899.         Created: 08/  /85        Last Updated: 07/12/88
  900.  
  901.         Author: Bob Pritchett    Source File: BOX.C
  902.  
  903.         Requires: gotoxy() putch()
  904.  
  905.         Description:
  906.  
  907.         The  box  function draws a graphic box using the upper  left  and
  908.         lower  right  corner  coordinates.   The border style  can  be  a
  909.         combination  of the double and single line characters of the  IBM
  910.         character set,  or any other printable character used all the way
  911.         around.   The  border is chosen with type.   If type is equal  to
  912.         one,  an all single line border is drawn.  If it is two, a double
  913.         horizontal line and single vertical line is used,  if it is three
  914.         it  is  an all double border,  if it is four a single  horizontal
  915.         line  and double vertical line are used.   In the case of a five,
  916.         three ASCII characters, + - |, are used.  Any other value in type
  917.         will cause the border to consist entirely of this character.
  918.  
  919.         See Also:
  920.  
  921.         cbox()
  922.  
  923.         Example:
  924.  
  925.         box(10,10,20,30,'*');    /* A box with a border of *'s */
  926.  
  927.  
  928.  
  929.                                                               cbcapt
  930.         Summary:
  931.  
  932.         int cbcapt(flag);
  933.         int *flag;               /* Location of Integer Flag */
  934.  
  935.         Created: 10/26/86        Last Updated: 07/12/88
  936.  
  937.         Author:                  Source File: CBRKTRAP.ASM
  938.  
  939.         Requires: Nothing.
  940.  
  941.         Description:
  942.  
  943.         This  function  allows  the  programmer to detect  and  handle  a
  944.         Control-C  or Control-Break entered by the  user.   The  function
  945.         must  be called with the location of a static integer which  will
  946.         be  set positive when a Control-C or Control-Break is  hit.   The
  947.         program may then choose to test and handle the flag, or ignore it
  948.         totally, effectually disabling the break features.
  949.  
  950.         This  function is based on routines in Advanced MS-DOS and The  C
  951.         Toolbox, by Ray Duncan and William Hunt.
  952.  
  953.         NOTE:  cbcapt() and cbrest() have not been modified for  multiple
  954.         memory  model support and should not be used;  the  control-break
  955.         functions  provided  by Microsoft and Borland are  preferred,  as
  956.         they are more functional and more widely used.
  957.  
  958.         See Also:
  959.  
  960.         cbrest()
  961.  
  962.         Example:
  963.  
  964.         main()
  965.          {
  966.           static int flag = 0;
  967.           timer();
  968.           cbcapt(&flag);
  969.           while ( flag == 0 )
  970.                 printf("Waiting for Ctrl-Break.\n");
  971.           printf("Control-Break detected after %ld clock ticks.\n"
  972.                  ,timer());
  973.           cbrest();
  974.           exit(0);
  975.          }
  976.  
  977.  
  978.  
  979.                                                                 cbox
  980.         Summary:
  981.  
  982.         void cbox(x,y,x2,y2,type);
  983.         int x;                   /* Upper Left Row */
  984.         int y;                   /* Upper Left Col */
  985.         int x2;                  /* Lower Right Row */
  986.         int y2;                  /* Lower Right Col */
  987.         int type;                /* Style of Border */
  988.  
  989.         Created: 03/03/86        Last Updated: 07/12/88
  990.  
  991.         Author: Bob Pritchett    Source File: CBOX.C
  992.  
  993.         Requires: putchci() gotoxy()
  994.  
  995.         Description:
  996.  
  997.         This  function  is functionaly the same as box() except that  the
  998.         box  is drawn in the current color.   It is primarily used as  an
  999.         internal routine in COUTPUT.C.  For independant use, use color()
  1000.         or wcolor() to set the color.
  1001.  
  1002.         See Also:
  1003.  
  1004.         color() wcolor() box()
  1005.  
  1006.         Example:
  1007.  
  1008.         #include "color.h"       /* Just for the colors... */
  1009.  
  1010.         color(RED_F,WHT_B);      /* Red on White */
  1011.  
  1012.         cbox(5,5,20,60,1);       /* A box with a single line border */
  1013.  
  1014.  
  1015.  
  1016.                                                               cbrest
  1017.         Summary:
  1018.  
  1019.         int cbrest();
  1020.  
  1021.         Created: 10/26/86        Last Updated: 07/12/88
  1022.  
  1023.         Author:                  Source File: CBRKTRAP.ASM
  1024.  
  1025.         Requires: Nothing.
  1026.  
  1027.         Description:
  1028.  
  1029.         This  function disables the Control-C and Control-Break  trapping
  1030.         turned on by cbcapt().  While it is not always neccessary to call
  1031.         this function before exiting a program, it is a good practice.
  1032.  
  1033.         See Also:
  1034.  
  1035.         cbcapt()
  1036.  
  1037.         Example:
  1038.  
  1039.         main()
  1040.          {
  1041.           static int flag = 0;
  1042.           timer();
  1043.           cbcapt(&flag);
  1044.           while ( flag == 0 )
  1045.                 printf("Waiting for Ctrl-Break.\n");
  1046.           printf("Control-Break detected after %ld clock ticks.\n"
  1047.                  ,timer());
  1048.           cbrest();
  1049.           exit(0);
  1050.          }
  1051.  
  1052.  
  1053.  
  1054.                                                              ccenter
  1055.         Summary:
  1056.  
  1057.         void ccenter(row,string,color);
  1058.         int row;                 /* Row to Center String on */
  1059.         char *string;            /* String to Center on Screen */
  1060.         int color;               /* Color to Print String in */
  1061.  
  1062.         Created: 12/28/85        Last Updated: 07/12/88
  1063.  
  1064.         Author: Bob Pritchett    Source File: CCENTER.C
  1065.  
  1066.         Requires: gotoxy() ccputs()
  1067.  
  1068.         Description:
  1069.  
  1070.         This  routine  is functionaly the same as center() only that  the
  1071.         line is displayed in the color specified.
  1072.  
  1073.         Return Value:
  1074.  
  1075.         Nothing is returned and there are no validity checks.   Giving  a
  1076.         string longer then 80 characters, or a line number less then zero
  1077.         or  greater  then 24 will produce an unknown  result  on  screen,
  1078.         while it should return cleanly.
  1079.  
  1080.         See Also:
  1081.  
  1082.         center() putat() cputat()
  1083.  
  1084.         Example:
  1085.  
  1086.         #include "color.h"
  1087.  
  1088.         char *string;
  1089.         scanf("%s",string);
  1090.  
  1091.         ccenter(0,"This line is centered in color.",RED_F);
  1092.         ccenter(2,"This one is in magenta on black, as opposed to red."
  1093.                 ,MAG_F);
  1094.         ccenter(3,"And yet another line, this time in green.",GRN_F);
  1095.  
  1096.         ccenter(5,string,WHT_F+BLU_B);
  1097.  
  1098.  
  1099.  
  1100.                                                                 ccls
  1101.         Summary:
  1102.  
  1103.         #include "color.h"       /* For color definitions only... */
  1104.  
  1105.         int ccls(color);
  1106.         int color;               /* Color of Screen */
  1107.  
  1108.         Created: 12/28/85        Last Updated: 07/12/88
  1109.  
  1110.         Author: Bob Pritchett    Source File: CCLS.ASM
  1111.  
  1112.         Requires: Nothing.
  1113.  
  1114.         Description:
  1115.  
  1116.         This  function  clears the screen and sets all the attributes  to
  1117.         the given color.  The cursor is sent to the home position.
  1118.  
  1119.         Return Value:
  1120.  
  1121.         Nothing.
  1122.  
  1123.         See Also:
  1124.  
  1125.         cls()
  1126.  
  1127.         Example:
  1128.  
  1129.         #include "color.h"
  1130.  
  1131.         ccls(RED_F+BLU_B);       /* Attributes are red on blue. */
  1132.  
  1133.  
  1134.  
  1135.                                                               ccputs
  1136.         Summary:
  1137.  
  1138.         #include "color.h"       /* Color definitions only */
  1139.  
  1140.         void ccputs(string,color);
  1141.         int string;              /* String to Put */
  1142.         int color;               /* Color of String */
  1143.  
  1144.         Created: 12/29/85        Last Updated: 07/12/88
  1145.  
  1146.         Author: Bob Pritchett    Source File: CCPUTS.C
  1147.  
  1148.         Requires: putchci()
  1149.  
  1150.         Description:
  1151.  
  1152.         This  function  puts the given string out to the  current  cursor
  1153.         position  in  the  specified color,  using putchci() to  do  BIOS
  1154.         output.   Any control characters in the string are  sent  through
  1155.         the  compiler supplied putch() function.  Note that putch()  does
  1156.         not  map  newline ('\n') to  carriage-return-line-feed,  as  does
  1157.         printf(), but simply to line-feed.
  1158.  
  1159.         See Also:
  1160.  
  1161.         putchci()
  1162.  
  1163.         Example:
  1164.  
  1165.         #include "color.h"
  1166.  
  1167.         ccputs("This string in red.\n\r",RED_F);
  1168.         ccputs("Appear just below, this string is green.\n\r",GRN_F);
  1169.  
  1170.  
  1171.  
  1172.                                                               center
  1173.         Summary:
  1174.  
  1175.         void center(row,string);
  1176.         int row;                 /* Row to Center String on */
  1177.         char *string;            /* String to Center on Screen */
  1178.  
  1179.         Created: 09/  /85        Last Updated: 07/12/88
  1180.  
  1181.         Author: Bob Pritchett    Source File: CENTER.C
  1182.  
  1183.         Requires: gotoxy() prints()
  1184.  
  1185.         Description:
  1186.  
  1187.         This  routine will simply center string on line row.   An  eighty
  1188.         column  display is assumed,  and the cursor is left at the end of
  1189.         the string.
  1190.  
  1191.         Return Value:
  1192.  
  1193.         Nothing is returned and there are no validity checks.   Giving  a
  1194.         string longer then 80 characters, or a line number less then zero
  1195.         or  greater  then 24 will produce an unknown  result  on  screen,
  1196.         while it should return cleanly.
  1197.  
  1198.         See Also:
  1199.  
  1200.         centerf() ccenter() putat() cputat()
  1201.  
  1202.         Example:
  1203.  
  1204.         #include <stdio.h>
  1205.  
  1206.         char *string;
  1207.         scanf("%s",string);
  1208.  
  1209.         center(0,"This line is centered.  Centering has a slight");
  1210.         center(1,"disadvantage with constant text in that the computation is");
  1211.         center(2,"done at run-time, as opposed to using putat() with a");
  1212.         center(3,"precalculated center.");
  1213.  
  1214.         center(5,string);
  1215.  
  1216.  
  1217.  
  1218.                                                              centerf
  1219.         Summary:
  1220.  
  1221.         void centerf(row,string[,arguments...]);
  1222.         int row;                 /* Row to Center String on */
  1223.         char *string;            /* String to Center on Screen */
  1224.  
  1225.         Created: 04/13/86        Last Updated: 07/12/88
  1226.  
  1227.         Author: Bob Pritchett    Source in: CENTERF.C
  1228.  
  1229.         Requires: gotoxy() prints()
  1230.  
  1231.         Description:
  1232.  
  1233.         This  routine  performs the exact same function as center()  with
  1234.         the  exception  that the string may contain  formatting  controls
  1235.         which  are  proccessed according to the same  rules  as  printf()
  1236.         before the string is centered.  Up to 15 formatting arguments may
  1237.         be used per string.
  1238.  
  1239.         Return Value:
  1240.  
  1241.         Nothing returned,  nor are coordinates checked, but be careful to
  1242.         make  sure  the formatted string will be less then 80  characters
  1243.         long.
  1244.  
  1245.         See Also:
  1246.  
  1247.         center() ccenter() putat() cputat()
  1248.  
  1249.         Example:
  1250.  
  1251.         #include <stdio.h>
  1252.  
  1253.         char *string;
  1254.         printf("What is your name? ");
  1255.         scanf("%s",string);
  1256.  
  1257.         centerf(4,"The answer is: %04d",243);
  1258.         centerf(7,"Hello, %s, nice to meet you.",string);
  1259.  
  1260.  
  1261.  
  1262.                                                               cfield
  1263.         Summary:
  1264.  
  1265.         int cfield(chr,clr,tms);
  1266.         int chr;                 /* Character to Use in Field */
  1267.         int clr;                 /* Attribute to Use for Field */
  1268.         int tms;                 /* Length of the Field */
  1269.  
  1270.         Created: 09/25/86        Last Updated: 07/12/88
  1271.  
  1272.         Author: Bob Pritchett    Source in: CFIELD.ASM
  1273.  
  1274.         Requires: Nothing.
  1275.  
  1276.         Description:
  1277.  
  1278.         This  routine is a special assembly routine to create fields  for
  1279.         the field input routines.   Given the fill character,  attribute,
  1280.         and  length of the field it will create the field without  moving
  1281.         the cursor.  No checking of parameters is done.
  1282.  
  1283.         Return Value:
  1284.  
  1285.         Nothing is returned.
  1286.  
  1287.         See Also:
  1288.  
  1289.         finptstr()
  1290.  
  1291.         Example:
  1292.  
  1293.         #include "color.h"
  1294.  
  1295.         cfield('*',WHT_F+BLU_B,10);        /* Ten character white on */
  1296.                                            /* blue asterisk field. */
  1297.  
  1298.  
  1299.  
  1300.                                                             chk_date
  1301.         Summary:
  1302.  
  1303.         int chk_date(m,d,y);
  1304.         int m;                   /* Month of Date to Check */
  1305.         int d;                   /* Day of Date to Check */
  1306.         int y;                   /* Year of Date to Check */
  1307.  
  1308.         Created: 12/27/85        Last Updated: 07/12/88
  1309.  
  1310.         Author: Bob Pritchett    Source in: CSRDATE.C
  1311.  
  1312.         Requires: num_days()
  1313.  
  1314.         Description:
  1315.  
  1316.         This  routine  verifies that the day and month of the given  date
  1317.         are legitimate values.   The year is needed in order to check for
  1318.         leapyears.
  1319.  
  1320.         Return Value:
  1321.  
  1322.         The function evaluates true if the date is valid,  false if it is
  1323.         not.
  1324.  
  1325.         See Also:
  1326.  
  1327.         valid_date() num_days() dt_diff()
  1328.  
  1329.         Example:
  1330.  
  1331.         if ( chk_date(6,15,1500) )         /* Evaluates True */
  1332.            function();
  1333.  
  1334.  
  1335.  
  1336.                                                               chline
  1337.         Summary:
  1338.  
  1339.         void chline(x,y,y2,type);
  1340.         int x;                   /* Upper Left Row */
  1341.         int y;                   /* Upper Left Col */
  1342.         int y2;                  /* Lower Right Col */
  1343.         int type;                /* Style of Border */
  1344.  
  1345.         Created: 03/03/86        Last Updated: 07/12/88
  1346.  
  1347.         Author: Bob Pritchett    Source in: CHLINE.C
  1348.  
  1349.         Requires: putchci() gotoxy()
  1350.  
  1351.         Description:
  1352.  
  1353.         This  function  will  draw  a  line at  x,y  to  x,y2  using  the
  1354.         character(s) specified in type.   Type may be any one of the five
  1355.         types  accepted by box().   Usually this function is used to draw
  1356.         lines  inside boxes,  as it will use the proper side  characters,
  1357.         but by using an ASCII character in type an ordinary line of  that
  1358.         character is drawn.   The line is drawn in the current color,  as
  1359.         specified by color().
  1360.  
  1361.         Return Value:
  1362.  
  1363.         Returns  a zero  if  successful,   a  negative  one  if   invalid
  1364.         coordinates are passed.
  1365.  
  1366.         See Also:
  1367.  
  1368.         cvline() whline()
  1369.  
  1370.         Example:
  1371.  
  1372.         #include "color.h"       /* Just for the colors... */
  1373.  
  1374.         color(RED_F,WHT_B);      /* Red on White */
  1375.  
  1376.         cbox(5,5,20,60,1);       /* A box with a single line border */
  1377.  
  1378.         chline(5,7,60,1);        /* Draws a line across the box */
  1379.  
  1380.  
  1381.  
  1382.                                                               clreol
  1383.         Summary:
  1384.  
  1385.         void clreol();
  1386.  
  1387.         Created: 07/10/87        Last Updated: 07/12/88
  1388.  
  1389.         Author: Bob Pritchett    Source in: CLREOL.C
  1390.  
  1391.         Requires: gotoxy() putchci() cursor_read()
  1392.  
  1393.         Description:
  1394.  
  1395.         This  function reads the current cursor position and  clears,  in
  1396.         the  color set by the color() function, the line from the  cursor
  1397.         to  column 80.  The cursor is returned to the location it was  at
  1398.         before the function was called.
  1399.  
  1400.         See Also:
  1401.  
  1402.         cls() gotoxy() cursor_read() color()
  1403.  
  1404.         Example:
  1405.  
  1406.         gotoxy(7,10);
  1407.         clreol();
  1408.  
  1409.  
  1410.  
  1411.                                                                  cls
  1412.         Summary:
  1413.  
  1414.         int cls();
  1415.  
  1416.         Created: 12/28/85        Last Updated: 07/12/88
  1417.  
  1418.         Author: Bob Pritchett    Source in: CLS.ASM
  1419.  
  1420.         Requires: Nothing.
  1421.  
  1422.         Description:
  1423.  
  1424.         This  function clears the screen and sends the cursor to the home
  1425.         position using the video BIOS interrupt.
  1426.  
  1427.         Return Value:
  1428.  
  1429.         Nothing.
  1430.  
  1431.         See Also:
  1432.  
  1433.         ccls() wcls()
  1434.  
  1435.         Example:
  1436.  
  1437.         cls();
  1438.  
  1439.  
  1440.  
  1441.                                                                color
  1442.         Summary:
  1443.  
  1444.         #include "color.h"       /* For Color Definitions Only */
  1445.  
  1446.         int color(attr)
  1447.         int attr;                /* Color Attributes */
  1448.  
  1449.         Created: 03/03/86        Last Updated: 07/12/88
  1450.  
  1451.         Author: Bob Pritchett    Source in: CSRCOLOR.C
  1452.  
  1453.         Requires: Nothing.
  1454.  
  1455.         Description:
  1456.  
  1457.         This  routine  sets  the  colors  to be  used  in  all  following
  1458.         operations  involving  color  in  the  windows  package,   unless
  1459.         otherwise  specified.    In  version  1.0  color()  required  two
  1460.         arguments,  the  fore  and background  attributes.   To  maintain
  1461.         compatibility  with other <x>color() routines,  there is now only
  1462.         one argument, with the attributes added together.
  1463.  
  1464.         If  color()'s  argument is -1,  it returns the current value  for
  1465.         color operations.   This is useful if you wish to write windowing
  1466.         functions that restore the current color attributes after opening
  1467.         their own windows.
  1468.  
  1469.         Return Value:
  1470.  
  1471.         The color is returned.
  1472.  
  1473.         See Also:
  1474.  
  1475.         wcolor() mcolor()
  1476.  
  1477.         Example:
  1478.  
  1479.         #include "color.h"
  1480.  
  1481.         color(RED_F+BOLD+BLU_B);      /* Bold Red on Blue. */
  1482.  
  1483.  
  1484.  
  1485.                                                         current_page
  1486.         Summary:
  1487.  
  1488.         int current_page();
  1489.  
  1490.         Created: 02/22/86        Last Updated: 07/12/88
  1491.  
  1492.         Author: Bob Pritchett    Source in: CURSOR.C
  1493.  
  1494.         Requires: int86()
  1495.  
  1496.         Description:
  1497.  
  1498.         This function returns the current active video page.
  1499.  
  1500.         Return Value:
  1501.  
  1502.         Number of current video page is returned,  0-3 or 0-7,  depending
  1503.         on monitor.
  1504.  
  1505.         See Also:
  1506.  
  1507.         set_page()
  1508.  
  1509.         Example:
  1510.  
  1511.         #include <stdio.h>
  1512.  
  1513.         printf("The current video display page is: %d\n",current_page());
  1514.  
  1515.  
  1516.  
  1517.                                                           cursor_off
  1518.         Summary:
  1519.  
  1520.         void cursor_off();
  1521.  
  1522.         Created: 02/22/86        Last Updated: 07/12/88
  1523.  
  1524.         Author: Bob Pritchett    Source in: CURSOR.C
  1525.  
  1526.         Requires: Nothing.
  1527.  
  1528.         Description:
  1529.  
  1530.         This  function will turn the cursor off using the technique  used
  1531.         by graphics modes in order to make it 'invisible.'
  1532.  
  1533.         See Also:
  1534.  
  1535.         cursor_on()
  1536.  
  1537.         Example:
  1538.  
  1539.         cursor_off();
  1540.  
  1541.  
  1542.  
  1543.                                                            cursor_on
  1544.         Summary:
  1545.  
  1546.         void cursor_on();
  1547.  
  1548.         Created: 02/22/86        Last Updated: 07/12/88
  1549.  
  1550.         Author: Bob Pritchett    Source in: CURSOR.C
  1551.  
  1552.         Requires: Nothing.
  1553.  
  1554.         Description:
  1555.  
  1556.         Doing  the  opposite of the cursor_off() function  this  function
  1557.         restores  the cursor and returns the shape (scan lines) to  their
  1558.         default state.
  1559.  
  1560.         See Also:
  1561.  
  1562.         cursor_off()
  1563.  
  1564.         Example:
  1565.  
  1566.         cursor_off();
  1567.  
  1568.         cursor_on();
  1569.  
  1570.  
  1571.  
  1572.                                                          cursor_read
  1573.         Summary:
  1574.  
  1575.         void cursor_read(row,col)
  1576.         int *row;                /* Location to Store Row */
  1577.         int *col;                /* Location to Store Col */
  1578.  
  1579.         Created: 02/22/86        Last Updated: 07/12/88
  1580.  
  1581.         Author: Bob Pritchett    Source in: CURSOR.C
  1582.  
  1583.         Requires: Nothing.
  1584.  
  1585.         Description:
  1586.  
  1587.         This  funciton places the current cursor positions into  row  and
  1588.         col, using the video BIOS interrupt.
  1589.  
  1590.         See Also:
  1591.  
  1592.         gotoxy()
  1593.  
  1594.         Example:
  1595.  
  1596.         int x;
  1597.         int y;
  1598.         cursor_read(&x,&y);
  1599.         gotoxy(x+2,y-3);         /* Move diagonally down and left. */
  1600.  
  1601.  
  1602.  
  1603.                                                          cursor_size
  1604.         Summary:
  1605.  
  1606.         void cursor_size(start,end);
  1607.         int start;               /* Starting Scan Line */
  1608.         int end;                 /* Ending Scan Line */
  1609.  
  1610.         Created: 02/22/86        Last Updated: 07/12/88
  1611.  
  1612.         Author: Bob Pritchett    Source in: CURSOR.C
  1613.  
  1614.         Requires: Nothing.
  1615.  
  1616.         Description:
  1617.  
  1618.         This  funciton  sets the cursor scan lines to start  and  finish.
  1619.         Specifying  a  larger start then finish line causes  it  to  wrap
  1620.         around and form a two part cursor.
  1621.  
  1622.         Note that in monochrome mode there are 14 scan lines (0-13),  and
  1623.         in color 8 (0-7).
  1624.  
  1625.         See Also:
  1626.  
  1627.         cursor_on() cursor_off()
  1628.  
  1629.         Example:
  1630.  
  1631.         if ( get_mode() == 7 )          /* If Monochrome Display */
  1632.            cursor_size(12,13);          /* Two Line Underline */
  1633.         else                            /* Else in Color Mode */
  1634.            cursor_size(6,7);            /* Two Line Underline */
  1635.  
  1636.  
  1637.  
  1638.                                                               cvline
  1639.         Summary:
  1640.  
  1641.         void cvline(y,x,x2,type);
  1642.         int y;                   /* Upper Left Col */
  1643.         int x;                   /* Upper Left Row */
  1644.         int x2;                  /* Lower Right Row */
  1645.         int type;                /* Style of Border */
  1646.  
  1647.         Created: 03/03/86        Last Updated: 07/12/88
  1648.  
  1649.         Author: Bob Pritchett    Source in: CVLINE.C
  1650.  
  1651.         Requires: putchci() gotoxy()
  1652.  
  1653.         Description:
  1654.  
  1655.         This  function  will  draw  a  line at  x,y  to  x2,y  using  the
  1656.         character(s) specified in type.   Type may be any one of the five
  1657.         types  accepted by box().   Usually this function is used to draw
  1658.         lines  inside  boxes,  as it will use the proper top  and  bottom
  1659.         characters,  but by using an ASCII character in type an  ordinary
  1660.         line  of  that  character is drawn.   The line is  drawn  in  the
  1661.         current color, as specified by color().
  1662.  
  1663.         Return Value:
  1664.  
  1665.         Returns  a  zero  if  successful,  a  negative  one  if   invalid
  1666.         coordinates are passed.
  1667.  
  1668.         See Also:
  1669.  
  1670.         chline() wvline()
  1671.  
  1672.         Example:
  1673.  
  1674.         #include "color.h"       /* Just for the colors... */
  1675.  
  1676.         color(RED_F,WHT_B);      /* Red on White */
  1677.  
  1678.         cbox(5,5,20,60,1);       /* A box with a single line border */
  1679.  
  1680.         cvline(7,5,20,1);        /* Draws a line down the box */
  1681.  
  1682.  
  1683.  
  1684.                                                              date_sn
  1685.         Summary:
  1686.  
  1687.         unsigned int date_sn(m,d,y);
  1688.         int m;                   /* Month */
  1689.         int d;                   /* Day */
  1690.         int y;                   /* Year */
  1691.  
  1692.         Created: 09/01/86        Last Updated: 07/12/88
  1693.  
  1694.         Author: George Roukas    Source in: CSRDATE.C
  1695.  
  1696.         Requires: valid_date() day_of_year() isleap()
  1697.  
  1698.         Description:
  1699.  
  1700.         This  function turns the given date into a single integer  serial
  1701.         number  which it returns.   This serial number is used by various
  1702.         other date routines and can also be used for date arithmetic.
  1703.  
  1704.         The  serial  number  may not exceed 54788,  the  number  of  days
  1705.         between January 1, 1900, and December 31, 2049.
  1706.  
  1707.         Note that the year may be in either four or two digit form.
  1708.  
  1709.         Return Value:
  1710.  
  1711.         Returns an unsigned integer serial number.
  1712.  
  1713.         See Also:
  1714.  
  1715.         dt_diff() valid_date() sn_date()
  1716.  
  1717.         Example:
  1718.  
  1719.         int m, d, y;
  1720.  
  1721.         printf("\nEnter your birthdate: (MM/DD/YY) ");
  1722.         scanf("%d/%d/%d",m,d,y);
  1723.         printf("\nYou special serial number is %d.\n",date_sn(m,d,y));
  1724.  
  1725.  
  1726.  
  1727.                                                          day_of_year
  1728.         Summary:
  1729.  
  1730.         int date_sn(m,d,y);
  1731.         int m;                   /* Month */
  1732.         int d;                   /* Day */
  1733.         int y;                   /* Year */
  1734.  
  1735.         Created: 09/01/86        Last Updated: 07/12/88
  1736.  
  1737.         Author: George Roukas    Source in: CSRDATE.C
  1738.  
  1739.         Requires: isleap()
  1740.  
  1741.         Description:
  1742.  
  1743.         This function is similar to the day_of_year() function in K&R, pp
  1744.         103-104,  and  returns  the number of elapsed days in  the  given
  1745.         year.
  1746.  
  1747.         Return Value:
  1748.  
  1749.         Elapsed days since the beginning of the year.   1/1 = 1, 1/2 = 2,
  1750.         etc.
  1751.  
  1752.         See Also:
  1753.  
  1754.         month_day()
  1755.  
  1756.         Example:
  1757.  
  1758.         int m, d, y;
  1759.  
  1760.         printf("\nEnter your birthdate: (MM/DD/YY) ");
  1761.         scanf("%d/%d/%d",m,d,y);
  1762.         printf("\nYou were born on the %d day of the year.\n"
  1763.               ,day_of_year(m,d,y));
  1764.  
  1765.  
  1766.  
  1767.                                                               dirwin
  1768.         Summary:
  1769.  
  1770.         void dirwin(path,name);
  1771.         char *path;              /* Path, With Drive */
  1772.         char *name;              /* Template for File Name */
  1773.  
  1774.         Created: 04/20/86        Last Updated: 07/12/88
  1775.  
  1776.         Author: Bob Pritchett    Source in: DIRWIN.C
  1777.  
  1778.         Requires: ffirst() fnext()
  1779.  
  1780.         Description:
  1781.  
  1782.         This  routine  opens a window in the current colors in which  the
  1783.         specified  directory  is displayed in four columns of  nine  file
  1784.         names.   When  a  directory exceeds thirty-six file names  a  key
  1785.         press clears the window and displays the next thirty-six,  and so
  1786.         on until the last screen is displayed,  after which the window is
  1787.         closed.
  1788.  
  1789.         The  pathname  should include the drive letter  and  subdirectory
  1790.         path.   If  the  root is being used at least the \ should  be  in
  1791.         path.   The  title  used is  "[  Dir:  %s\\%s  ]",path,name.   An
  1792.         appropriate path and template might be: "A:\\","*.*".
  1793.  
  1794.         The  file names are displayed once in the order they are found on
  1795.         the  disk.   (The  same  order with the DIR command  at  the  DOS
  1796.         prompt.)  The filenames are left justified in their columns  with
  1797.         a dot separater between the name and extension.
  1798.  
  1799.         See Also:
  1800.  
  1801.         ffirst() fnext()
  1802.  
  1803.         Example:
  1804.  
  1805.         dirwin("C:\\C","*.C");
  1806.  
  1807.  
  1808.  
  1809.                                                                  dma
  1810.         Summary:
  1811.  
  1812.         void dma(x);
  1813.         int x;                   /* Value of DMA Flag */
  1814.  
  1815.         Created: 05/24/86        Last Updated: 07/12/88
  1816.  
  1817.         Author: Bob Pritchett    Source in: COUTPUT.C
  1818.  
  1819.         Requires: Nothing.
  1820.  
  1821.         Description:
  1822.  
  1823.         This  routine sets the direct memory access flag on or off.   The
  1824.         flag defaults to 1, on.
  1825.  
  1826.         See Also:
  1827.  
  1828.         retrace()
  1829.  
  1830.         Example:
  1831.  
  1832.         dma(0);             /* Turn off Direct Memory Access */
  1833.  
  1834.  
  1835.  
  1836.                                                              dt_diff
  1837.         Summary:
  1838.  
  1839.         int dt_diff(m,d,y,mn,dy,yr);
  1840.         int m;                   /* Month of First Date */
  1841.         int d;                   /* Day of First Date */
  1842.         int y;                   /* Year of First Date */
  1843.         int mn;                  /* Month of Second Date */
  1844.         int dy;                  /* Day of Second Date */
  1845.         int yr;                  /* Year of Second Date */
  1846.  
  1847.         Created: 12/27/85        Last Updated: 07/12/88
  1848.  
  1849.         Author: Bob Pritchett    Source in: CSRDATE.C
  1850.  
  1851.         Requires: Nothing.
  1852.  
  1853.         Description:
  1854.  
  1855.         This  function will return the number of days difference  between
  1856.         the two dates passed as parameters.
  1857.  
  1858.         Return Value:
  1859.  
  1860.         Returns the number of days difference.
  1861.  
  1862.         See Also:
  1863.  
  1864.         date_sn() sn_date() chk_date() num_days()
  1865.  
  1866.         Example:
  1867.  
  1868.         int m;
  1869.         int d;
  1870.         int y;
  1871.  
  1872.         printf("I am %d days old as of August 17th, 1986.\n"
  1873.               ,dt_diff(6,15,1971,8,17,1986));
  1874.               /* The above returns 5541. */
  1875.  
  1876.         get_date(&d,&m,&y);
  1877.  
  1878.         printf("Ronald Reagan was born %d days ago.\n"
  1879.                ,dt_diff(2,6,1911,m,d,y));
  1880.         printf("C Spot Run Version 1.0 was released %d days ago.\n"
  1881.               ,dt_diff(5,5,1986,m,d,y));
  1882.  
  1883.  
  1884.  
  1885.                                                             fbreakon
  1886.         Summary:
  1887.  
  1888.         #include "skey.h"        /* Needed Only for Key Descriptions */
  1889.  
  1890.         void fbreakon(x);
  1891.         int x;                   /* Special Key to Break On */
  1892.  
  1893.         Created: 06/29/87        Last Updated: 07/12/88
  1894.  
  1895.         Author: Bob Pritchett    Source in: FINPUT.C
  1896.  
  1897.         Requires: Nothing.
  1898.  
  1899.         Description:
  1900.  
  1901.         This  function  allows the programmer to set which  special  keys
  1902.         will cause the finptstred() to exit.  Each call to this  function
  1903.         adds the argument given to the list of break keys.  (The #include
  1904.         file  SKEY.H  contains easy definitions for  the  special  keys.)
  1905.         When given zero as an argument the list is cleared.
  1906.  
  1907.         The default break keys are HOME, END, PGUP, PGDN, UARROW, DARROW,
  1908.         ALTE, ALTX, and ALTQ.
  1909.  
  1910.         See Also:
  1911.  
  1912.         wfbreakon() finptstred()
  1913.  
  1914.         Example:
  1915.  
  1916.         #include "skey.h"
  1917.  
  1918.         char temp[30];
  1919.  
  1920.         fbreakon(0);                    /* Clear List */
  1921.         fbreakon(ALTH);                 /* Alt-H Only */
  1922.  
  1923.         if ( finptstred(10,10,25,temp,"Default") == ALTH )
  1924.            help();
  1925.  
  1926.  
  1927.  
  1928.                                                                fchar
  1929.         Summary:
  1930.  
  1931.         int fchar(chr);
  1932.         int chr;                 /* Character to Use in Fields */
  1933.  
  1934.         Created: 09/25/86        Last Updated: 07/12/88
  1935.  
  1936.         Author: Bob Pritchett    Source in: FINPUT.C
  1937.  
  1938.         Requires: Nothing.
  1939.  
  1940.         Description:
  1941.  
  1942.         This function sets the character to be used for the background of
  1943.         field  input.   The  default is an ASCII space,  and when chr  is
  1944.         given as -1,  at any time,  the function will return the  current
  1945.         value  of the background character.   Otherwise the value of  chr
  1946.         will be returned.
  1947.  
  1948.         Return Value:
  1949.  
  1950.         Returns  the argument,  or in the case of the argument being  -1,
  1951.         the current value of the background character.
  1952.  
  1953.         See Also:
  1954.  
  1955.         wfchar() fcolor() ffill() finptint() finptstr()
  1956.  
  1957.         Example:
  1958.  
  1959.         fchar('*');              /* Set background to *'s. */
  1960.  
  1961.         printf("The current background character is: %c.\n",fchar(-1));
  1962.  
  1963.  
  1964.  
  1965.                                                               fcolor
  1966.         Summary:
  1967.  
  1968.         #include "color.h"       /* For Color Defintions Only */
  1969.  
  1970.         int fcolor(clr);
  1971.         int clr;                 /* Color to Use in Fields */
  1972.  
  1973.         Created: 09/25/86        Last Updated: 07/12/88
  1974.  
  1975.         Author: Bob Pritchett    Source in: FINPUT.C
  1976.  
  1977.         Requires: Nothing.
  1978.  
  1979.         Description:
  1980.  
  1981.         This  function  allows specification of the color to be  used  in
  1982.         field  input routines.   If the argument clr is equal to  -1  the
  1983.         current color is returned, and not changed.  The default is white
  1984.         on black.
  1985.  
  1986.         Return Value:
  1987.  
  1988.         Returns  the argument,  or in the case of the argument being  -1,
  1989.         the current value of the field color.
  1990.  
  1991.         See Also:
  1992.  
  1993.         wfcolor() fchar() ffill() finptint() finptstr()
  1994.  
  1995.         Example:
  1996.  
  1997.         #include "color.h"
  1998.  
  1999.         fcolor(BLK_F+WHT_B);               /* Reverse video attribute. */
  2000.  
  2001.  
  2002.  
  2003.                                                                ffill
  2004.         Summary:
  2005.  
  2006.         void ffill(rw,cl,mx);
  2007.         int rw;                  /* Row of Field */
  2008.         int cl;                  /* Column of Field */
  2009.         int mx;                  /* Length of Field */
  2010.  
  2011.         Created: 12/05/86        Last Updated: 07/12/88
  2012.  
  2013.         Author: Bob Pritchett    Source in: FINPUT.C
  2014.  
  2015.         Requires: gotoxy() cfield()
  2016.  
  2017.         Description:
  2018.  
  2019.         The  actual  input fields used by the input routines are  created
  2020.         when  the input is performed,  and remain on the screen to  allow
  2021.         the  program  to  bring  the user  back  to  change  the  field's
  2022.         contents.   This arrangement means, though, that a full screen of
  2023.         field  input will not display all the actual fields until all the
  2024.         input  has  been  performed.    This  function  takes  the  three
  2025.         arguments  common  to any field input function call in  order  to
  2026.         'draw' the fields before input is performed.   The current  field
  2027.         color and character attributes are used.
  2028.  
  2029.         See Also:
  2030.  
  2031.         wffill() fchar() fcolor() finptint() finptstr()
  2032.  
  2033.         Example:
  2034.  
  2035.         ffill(10,20,10);            /* At 10,20 a 10 character field. */
  2036.  
  2037.         putat(5,10,"Num: ");        /* A prompt for the next field. */
  2038.         ffill(5,15,6);              /* At 5,15 a 6 character field. */
  2039.         gotoxy(5,15);               /* Not needed, as ffill() leaves */
  2040.                                     /* the cursor at the coordinates. */
  2041.         ccputs("192",fcolor(-1));   /* Put a default value on the */
  2042.                                     /* screen with the field color. */
  2043.  
  2044.  
  2045.  
  2046.                                                               ffirst
  2047.         Summary:
  2048.  
  2049.         #include "csrdos.h"      /* Contains struct DIRS, for buf */
  2050.  
  2051.         int ffirst(dir,buf,template,attr);
  2052.         char *dir;               /* Subdir to Use */
  2053.         char *buf;               /* Location to Store Data */
  2054.         char *template;          /* FileName/Template to Search for */
  2055.         int attr;                /* Attribute to Include in Search */
  2056.  
  2057.         Created: 04/04/86        Last Updated: 07/12/88
  2058.  
  2059.         Author: Bob Pritchett    Source in: DIRSRCH.C
  2060.  
  2061.         Requires: intdos()
  2062.  
  2063.         Description:
  2064.  
  2065.         Using  DOS 2.0 function 0x4e (2.00 and above only) this  function
  2066.         begins  the  search for a file in the specified  directory  using
  2067.         either  a file name or template with wildcard characters ( ?  * )
  2068.         as the file to search for.   The path must be a standard DOS path
  2069.         name (without file name),  using two backslashes instead of  one.
  2070.         If the path to search is the root, use the path string of "".
  2071.  
  2072.         The  attribute  specified in attr is the attribute to use in  the
  2073.         search.   If none is specified, then only files are reported.  If
  2074.         the volume attribute is used,  the volume label is returned.   If
  2075.         the  sub-directory  attribute is specified,  all files  AND  sub-
  2076.         directories  are returned.   The same applies to the  hidden  and
  2077.         and  system attributes,  but the archive and read-only attributes
  2078.         can not be used in searches.
  2079.  
  2080.         After  a  file  is  found it's data is  placed  in  buf  (consult
  2081.         CSRDOS.H  for  the  DIRS  structure).   The  entry  type  may  be
  2082.         determined by & ing the returned attribute and the attribute  you
  2083.         wish to test for, as in   if ( buf.attr & SUBDIR )  would be true
  2084.         if the entry was a subdirectory.
  2085.  
  2086.         Return Value:
  2087.  
  2088.         Returns the value of the AX register,  2 for file not found,  and
  2089.         18 for no more files to be found.
  2090.  
  2091.         See Also:
  2092.  
  2093.         fnext()
  2094.  
  2095.  
  2096.  
  2097.                                                               ffirst
  2098.  
  2099.  
  2100.  
  2101.  
  2102.         Example:
  2103.  
  2104.         #include "csrdos.h"
  2105.  
  2106.         struct DIRS buf;
  2107.  
  2108.         ffirst("",&buf,"*.SYS",0);      /* Find first .SYS file in root. */
  2109.  
  2110.  
  2111.  
  2112.                                                                fnext
  2113.         Summary:
  2114.  
  2115.         #include "csrdos.h"      /* Contains struct DIRS, for buf */
  2116.  
  2117.         int fnext(dir,buf,template,attr);
  2118.         char *dir;               /* Subdir to Use */
  2119.         char *buf;               /* Location to Store Data */
  2120.         char *template;          /* FileName/Template to Search for */
  2121.         int attr;                /* Attribute to Include in Search */
  2122.  
  2123.         Created: 04/04/86        Last Updated: 07/12/88
  2124.  
  2125.         Author: Bob Pritchett    Source in: DIRSRCH.C
  2126.  
  2127.         Requires: intdos()
  2128.  
  2129.         Description:
  2130.  
  2131.         Using  DOS 2.0 function 0x4f (2.00 and above only) this  function
  2132.         continues  the  search begun with  ffirst().   This  function  is
  2133.         dependant  upon  information  left in the first 21 bytes  of  the
  2134.         buffer  used in ffirst,  so use the same buffer,  or begin a  new
  2135.         sequence with ffirst().
  2136.  
  2137.         Return Value:
  2138.  
  2139.         Returns the value of the AX register,  18 for no more files to be
  2140.         found, or nothing.
  2141.  
  2142.         See Also:
  2143.  
  2144.         ffirst().
  2145.  
  2146.         Example:
  2147.  
  2148.         #include "csrdos.h"
  2149.  
  2150.         int x;
  2151.         struct DIRS buf;
  2152.  
  2153.         ffirst("",&buf,"*.SYS",0);      /* Find first .SYS file in root. */
  2154.  
  2155.         while ( x != 18 )
  2156.          {
  2157.           printf("%s %ld\n",buf.name,buf.size); /* Print name & size. */
  2158.           x = fnext("",&buf,"*.SYS",0); /* Find next entry. */
  2159.          }
  2160.  
  2161.  
  2162.  
  2163.                                                             finptint
  2164.         Summary:
  2165.  
  2166.         int finptint(rw,cl,mx,x);
  2167.         int rw;                  /* Row of Field */
  2168.         int cl;                  /* Column of Field */
  2169.         int mx;                  /* Length of Field */
  2170.         int *x;                  /* Where to Put Result */
  2171.  
  2172.         Created: 09/25/86        Last Updated: 07/12/88
  2173.  
  2174.         Author: Bob Pritchett    Source in: FINPUT.C
  2175.  
  2176.         Requires: gotoxy() cfield()
  2177.  
  2178.         Description:
  2179.  
  2180.         This function will draw the field as specified by the first three
  2181.         arguments,  and  place the cursor at the first character of  this
  2182.         field.  (See ffill() about drawing the field.)  It will then wait
  2183.         for  the  user  to input an integer number with no more  than  mx
  2184.         characters.   The  funtion  will not allow the user  to  move  on
  2185.         without entering an integer.
  2186.  
  2187.         Return Value:
  2188.  
  2189.         The integer inputted is returned.
  2190.  
  2191.         See Also:
  2192.  
  2193.         inptint() finptintd() wfinptint() ffill() finptstr()
  2194.  
  2195.         Example:
  2196.  
  2197.         int x;
  2198.  
  2199.         putat(5,10,"Num: ");        /* A prompt for the next field. */
  2200.         finptint(5,15,6,&x);        /* At 5,15 a 6 character input. */
  2201.  
  2202.         printf("\n\n%d was the input.\n",x);
  2203.  
  2204.  
  2205.  
  2206.                                                            finptintd
  2207.         Summary:
  2208.  
  2209.         int finptintd(rw,cl,mx,x,d);
  2210.         int rw;                  /* Row of Field */
  2211.         int cl;                  /* Column of Field */
  2212.         int mx;                  /* Length of Field */
  2213.         int *x;                  /* Where to Put Result */
  2214.         int d;                   /* Default Integer */
  2215.  
  2216.         Created: 09/25/86        Last Updated: 07/12/88
  2217.  
  2218.         Author: Bob Pritchett    Source in: FINPUT.C
  2219.  
  2220.         Requires: gotoxy() cfield()
  2221.  
  2222.         Description:
  2223.  
  2224.         This  function  will  behave  just as does  finptint()  with  the
  2225.         exception that a carriage return as the first inputted  character
  2226.         will  cause  the  default variable to  be  returned.   Any  other
  2227.         character  as the first input will cause the default to be erased
  2228.         to be replaced by the user input.
  2229.  
  2230.         Return Value:
  2231.  
  2232.         The integer inputted is returned,  or,  in the case of a carriage
  2233.         return, the default.
  2234.  
  2235.         See Also:
  2236.  
  2237.         inptintd() finptint() wfinptintd() ffill() finptstr()
  2238.  
  2239.         Example:
  2240.  
  2241.         int x;
  2242.  
  2243.         putat(5,10,"Num: ");        /* A prompt for the next field. */
  2244.         finptintd(5,15,4,&x,37);    /* At 5,15 a 4 character input. */
  2245.  
  2246.         if ( x == 37 )
  2247.            printf("\n\nThe default, 37, was returned.\n");
  2248.         else
  2249.            printf("\n\n%d was the input.\n",x);
  2250.  
  2251.  
  2252.  
  2253.                                                            finptintr
  2254.         Summary:
  2255.  
  2256.         int finptintr(rw,cl,mx,x,lw,hg);
  2257.         int rw;                  /* Row of Field */
  2258.         int cl;                  /* Column of Field */
  2259.         int mx;                  /* Length of Field */
  2260.         int *x;                  /* Where to Put Result */
  2261.         int lw;                  /* Minimum Acceptable Value */
  2262.         int hg;                  /* Maximum Acceptable Value */
  2263.  
  2264.         Created: 09/25/86        Last Updated: 07/12/88
  2265.  
  2266.         Author: Bob Pritchett    Source in: FINPUT.C
  2267.  
  2268.         Requires: finptint()
  2269.  
  2270.         Description:
  2271.  
  2272.         This  function waits for a user inputted integer in the displayed
  2273.         field.   A  beep will sound and a new integer waited for if there
  2274.         is  no input or the inputted integer is not within the  specified
  2275.         range.
  2276.  
  2277.         Return Value:
  2278.  
  2279.         The inputted integer, within the range, is returned.
  2280.  
  2281.         See Also:
  2282.  
  2283.         inptintr() finptint() wfinptintd() ffill() finptstr()
  2284.         finptintrd()
  2285.  
  2286.         Example:
  2287.  
  2288.         int x;
  2289.  
  2290.         putat(5,10,"Num: ");        /* A prompt for the next field. */
  2291.         finptintr(5,15,4,&x,3,10);  /* At 5,15 a 4 character input */
  2292.                                     /* greater than 2 and less than */
  2293.                                     /* ten. */
  2294.  
  2295.  
  2296.  
  2297.                                                           finptintrd
  2298.         Summary:
  2299.  
  2300.         int finptintrd(rw,cl,mx,x,lw,hg,d);
  2301.         int rw;                  /* Row of Field */
  2302.         int cl;                  /* Column of Field */
  2303.         int mx;                  /* Length of Field */
  2304.         int *x;                  /* Where to Put Result */
  2305.         int lw;                  /* Minimum Acceptable Value */
  2306.         int hg;                  /* Maximum Acceptable Value */
  2307.         int d;                   /* Default Value */
  2308.  
  2309.         Created: 09/25/86        Last Updated: 07/12/88
  2310.  
  2311.         Author: Bob Pritchett    Source in: FINPUT.C
  2312.  
  2313.         Requires: finptintd()
  2314.  
  2315.         Description:
  2316.  
  2317.         This   function  behaves  as  do  finptintr()  and   finptintd(),
  2318.         combined.  However no check is made to see that the default value
  2319.         is  within  the  given range.   If it is  not,  it  will  not  be
  2320.         returnable.
  2321.  
  2322.         Return Value:
  2323.  
  2324.         The inputted integer,  within the range,  is returned, or, in the
  2325.         case  of a carriage return as the first inputted  character,  the
  2326.         default value.
  2327.  
  2328.         See Also:
  2329.  
  2330.         inptintr() finptint() wfinptintd() ffill() finptstr()
  2331.         finptintr()
  2332.  
  2333.         Example:
  2334.  
  2335.         int x;
  2336.  
  2337.         putat(5,10,"Num: ");         /* A prompt for the next field. */
  2338.         finptintrd(5,15,4,&x,3,10,5);/* At 5,15 a 4 character input */
  2339.                                      /* greater than 2 and less than */
  2340.                                      /* ten, or 5. */
  2341.  
  2342.  
  2343.  
  2344.                                                             finptstr
  2345.         Summary:
  2346.  
  2347.         char *finptstr(rw,cl,mx,str);
  2348.         int rw;                  /* Row of Field */
  2349.         int cl;                  /* Column of Field */
  2350.         int mx;                  /* Length of Field */
  2351.         char *str;               /* Where to Place Input */
  2352.  
  2353.         Created: 09/25/86        Last Updated: 07/12/88
  2354.  
  2355.         Author: Bob Pritchett    Source in: FINPUT.C
  2356.  
  2357.         Requires: gotoxy() cfield()
  2358.  
  2359.         Description:
  2360.  
  2361.         This  function  displays the field and waits for a string  to  be
  2362.         inputted  by the user.   In the case that no input is made a beep
  2363.         is  sounded and the function continues to wait until a string  is
  2364.         inputted.   When it is,  it is placed in the variable  specified,
  2365.         str.
  2366.  
  2367.         Return Value:
  2368.  
  2369.         A pointer to a duplicate of the inputted string is returned,  via
  2370.         strdup().
  2371.  
  2372.         See Also:
  2373.  
  2374.         inptintr() finptint() wfinptintd() ffill() finptstr()
  2375.         finptstrd()
  2376.  
  2377.         Example:
  2378.  
  2379.         char temp[80];
  2380.  
  2381.         finptstr(10,10,25,temp);
  2382.  
  2383.  
  2384.  
  2385.                                                            finptstrd
  2386.         Summary:
  2387.  
  2388.         char *finptstrd(rw,cl,mx,str,def);
  2389.         int rw;                  /* Row of Field */
  2390.         int cl;                  /* Column of Field */
  2391.         int mx;                  /* Length of Field */
  2392.         char *str;               /* Where to Place Input */
  2393.         char *def;               /* Default String */
  2394.  
  2395.         Created: 09/25/86        Last Updated: 07/12/88
  2396.  
  2397.         Author: Bob Pritchett    Source in: FINPUT.C
  2398.  
  2399.         Requires: gotoxy() cfield()
  2400.  
  2401.         Description:
  2402.  
  2403.         This  function behaves as does finptstr() with the exception that
  2404.         the specified default string is displayed and will be returned as
  2405.         the input in the case of a carriage return as the first character
  2406.         entered.
  2407.  
  2408.         Return Value:
  2409.  
  2410.         A pointer to a duplicate of the inputted string,  or the default,
  2411.         is returned, via strdup().
  2412.  
  2413.         See Also:
  2414.  
  2415.         inptintr() finptint() wfinptintd() ffill() finptstr()
  2416.         finptstre()
  2417.  
  2418.         Example:
  2419.  
  2420.         char temp[80];
  2421.  
  2422.         finptstrd(10,10,25,temp,"C Spot Run");
  2423.  
  2424.  
  2425.  
  2426.                                                            finptstre
  2427.         Summary:
  2428.  
  2429.         void finptstre(rw,cl,mx,str);
  2430.         int rw;                  /* Row of Field */
  2431.         int cl;                  /* Column of Field */
  2432.         int mx;                  /* Length of Field */
  2433.         char *str;               /* Where to Place Input */
  2434.  
  2435.         Created: 10/18/86        Last Updated: 07/12/88
  2436.  
  2437.         Author: Bob Pritchett    Source in: FINPUT.C
  2438.  
  2439.         Requires: finptstred()
  2440.  
  2441.         Description:
  2442.  
  2443.         This  function  calls  finptstred()  with a  NULL  string  for  a
  2444.         default and will not return until input has been made.
  2445.  
  2446.         Return Value:
  2447.  
  2448.         Nothing is returned.
  2449.  
  2450.         See Also:
  2451.  
  2452.         inptstr() finptint() wfinptintd() ffill() finptstr()
  2453.         finptstred() finptstr()
  2454.  
  2455.         Example:
  2456.  
  2457.         char temp[80];
  2458.  
  2459.         finptstre(10,10,25,temp);
  2460.  
  2461.         printf("temp contains: >%s<\n");
  2462.  
  2463.  
  2464.  
  2465.                                                           finptstred
  2466.         Summary:
  2467.  
  2468.     int finptstred(rw,cl,mx,str,def);
  2469.         int rw;                  /* Row of Field */
  2470.         int cl;                  /* Column of Field */
  2471.         int mx;                  /* Length of Field */
  2472.         char *str;               /* Where to Place Input */
  2473.         char *def;               /* Default String */
  2474.  
  2475.         Created: 10/18/86        Last Updated: 07/12/88
  2476.  
  2477.         Author: Bob Pritchett    Source in: FINPUT.C
  2478.  
  2479.         Requires: gotoxy() cfield()
  2480.  
  2481.         Description:
  2482.  
  2483.         This  powerful function displays the field specified  and  places
  2484.         the  default  string  within  it, and the  cursor  at  the  first
  2485.         character  of  this string.  The default string may  be  returned
  2486.         with a carriage return as the first character, it may be  editted
  2487.         with the left and right arrow keys and ins and del, the field may
  2488.         be  erased with the Alt-X combination, and the default input  can
  2489.         be  restored with the Alt-D combination.  Editting  is  performed
  2490.         with  the  ins and del keys in combination with movement  by  the
  2491.         left  and  right arrow keys.  The insert key will  toggle  insert
  2492.         'mode' on and off, although the cursor will not reflect the  mode
  2493.         change.   When in insert mode all characters to the right of  the
  2494.         cursor  will  move right (and possibly scroll out of  the  field)
  2495.         when  characters  are  inputted.   The del  key  will  erase  the
  2496.         character the cursor rests on and move everything to the right of
  2497.         the cursor left one space.  In order to allow for design of  full
  2498.         input  screens  the function will return with the  input  in  the
  2499.         appropriate location and the value of the key as the return value
  2500.         if  one  of  several extended function keys  is  entered.   These
  2501.         special  keys are those on the break list, which is  modified  by
  2502.         the fbreakon() function.  (The list of default keys is under  the
  2503.         description of this routine.)
  2504.  
  2505.         Return Value:
  2506.  
  2507.         A zero is returned unless input was terminated by a special  key,
  2508.         in which case its value will be returned.  (Special keys return a
  2509.         null followed by an integer.  The integer is returned here.)
  2510.  
  2511.  
  2512.  
  2513.                                                           finptstred
  2514.  
  2515.  
  2516.         See Also:
  2517.  
  2518.         inptstr() finptint() wfinptintd() ffill() finptstr()
  2519.         wfinptstred() fbreakon()
  2520.  
  2521.         Example:
  2522.  
  2523.         char temp[80];
  2524.         int x;
  2525.  
  2526.         x = finptstred(10,10,25,temp,"C Spot Run");
  2527.  
  2528.         if ( x )                      /* Special Value */
  2529.            process(x);                /* Process Key */
  2530.  
  2531.  
  2532.  
  2533.                                                              finptyn
  2534.         Summary:
  2535.  
  2536.         int finptyn(rw,cl);
  2537.         int rw;                  /* Row of Field */
  2538.         int cl;                  /* Column of Field */
  2539.  
  2540.         Created: 09/25/86        Last Updated: 07/12/88
  2541.  
  2542.         Author: Bob Pritchett    Source in: FINPUT.C
  2543.  
  2544.         Requires: gotoxy() cfield()
  2545.  
  2546.         Description:
  2547.  
  2548.         This  function  displays  a three character field  at  the  given
  2549.         coordinates  and waits for either a 'Y' or an 'N' (upper or lower
  2550.         case)  to  be  inputted.   Any other  character  will  cause  the
  2551.         function  to  sound a beep and continue to wait.   When  a  valid
  2552.         character  is  inputted  the full word will be displayed  in  the
  2553.         field  and  either  a  one or zero  returned,  for  'Y'  or  'N',
  2554.         respectively.
  2555.  
  2556.         Return Value:
  2557.  
  2558.         A one or a zero for a 'Y' or an 'N'.
  2559.  
  2560.         See Also:
  2561.  
  2562.         inptyn() finptint() wfinptintd() ffill() finptstr() finptynd()
  2563.  
  2564.         Example:
  2565.  
  2566.         char temp[80];
  2567.  
  2568.         finptyn(10,10);
  2569.  
  2570.  
  2571.  
  2572.                                                             finptynd
  2573.         Summary:
  2574.  
  2575.         int finptynd(rw,cl,def);
  2576.         int rw;                  /* Row of Field */
  2577.         int cl;                  /* Column of Field */
  2578.         int def;                 /* Default Input */
  2579.  
  2580.         Created: 09/25/86        Last Updated: 07/12/88
  2581.  
  2582.         Author: Bob Pritchett    Source in: FINPUT.C
  2583.  
  2584.         Requires: gotoxy() cfield()
  2585.  
  2586.         Description:
  2587.  
  2588.         This  function  behaves exactly as finptyn() with  the  exception
  2589.         that  the  default input is displayed and will be returned  if  a
  2590.         carriage return is entered instead of a 'Y' or 'N'.   The default
  2591.         value  needs to be in the format of the return value,  a  one  or
  2592.         zero.
  2593.  
  2594.         Return Value:
  2595.  
  2596.         A one or a zero for a 'Y' or an 'N', or whatever the default was.
  2597.  
  2598.         See Also:
  2599.  
  2600.         inptynd() finptint() wfinptintd() ffill() finptstr() finptyn()
  2601.  
  2602.         Example:
  2603.  
  2604.         char temp[80];
  2605.  
  2606.         finptynd(10,10,0);                 /* Default to no. */
  2607.  
  2608.  
  2609.  
  2610.                                                             fixcolor
  2611.         Summary:
  2612.  
  2613.         void fixcolor(atrib);
  2614.         int *attr;               /* Attribute to Check/Modify */
  2615.  
  2616.         Created: 12/12/86        Last Updated: 07/12/88
  2617.  
  2618.         Author:                  Source in: COUTPUT.C
  2619.  
  2620.         Requires: Nothing.
  2621.  
  2622.         Description:
  2623.  
  2624.         This  function will,  when a monochrome card,  or the CGA's black
  2625.         and  white mode,  is currently in use,  modify the  attribute  in
  2626.         order to make it compatible with monochrome attribute set.   This
  2627.         routine is used internally by the windowing functions.
  2628.  
  2629.         See Also:
  2630.  
  2631.         color() wcolor()
  2632.  
  2633.         Example:
  2634.  
  2635.         #include "color.h"
  2636.  
  2637.         int x;
  2638.         int y;
  2639.  
  2640.         x = WHT_F+BLU_B;
  2641.         y = RED_F+WHT_B;
  2642.  
  2643.         fixcolor(&x);         /* Modify the attribute if neccessary. * /
  2644.         fixcolor(&y);
  2645.  
  2646.          /* On a monochrome card x is now equivalent to WHT_F+BLK_B, */
  2647.          /* and y to BLK_F+WHT_B. */
  2648.  
  2649.  
  2650.  
  2651.                                                                gback
  2652.         Summary:
  2653.  
  2654.         int gback(clr);
  2655.         int clr;                 /* Color for Background */
  2656.  
  2657.         Created: 10/31/86        Last Updated: 07/12/88
  2658.  
  2659.         Author: Bob Pritchett    Source in: GBACK.ASM
  2660.  
  2661.         Requires: Nothing.
  2662.  
  2663.         Description:
  2664.  
  2665.         This  routine  initializes the graphics screen to  the  specified
  2666.         color, one of the palette colors in the description of gpal().
  2667.  
  2668.         See Also:
  2669.  
  2670.         ginit() gline() gdot() gpal()
  2671.  
  2672.         Example:
  2673.  
  2674.         ginit();
  2675.         gpal(0);
  2676.         gback(1);           /* Background to Green */
  2677.  
  2678.         gdot(10,10,2);      /* Red Dot at 10,10 */
  2679.  
  2680.  
  2681.  
  2682.                                                                 gbox
  2683.         Summary:
  2684.  
  2685.         void gbox(x,y,x2,y2,clr);
  2686.         int x;                   /* Upper Left Row */
  2687.         int y;                   /* Upper Left Column */
  2688.         int x2;                  /* Lower Right Row */
  2689.         int y2;                  /* Lower Right Column */
  2690.         int clr;                 /* Color for Box */
  2691.  
  2692.         Created: 11/01/86        Last Updated: 07/12/88
  2693.  
  2694.         Author: Bob Pritchett    Source in: GBOX.C
  2695.  
  2696.         Requires: gline()
  2697.  
  2698.         Description:
  2699.  
  2700.         This function draws a box with the coordinates given in the given
  2701.         color.  See gpal() and ginit() for information on valid values.
  2702.  
  2703.         See Also:
  2704.  
  2705.         ginit() gline() gfbox() gpal()
  2706.  
  2707.         Example:
  2708.  
  2709.         ginit();
  2710.         gpal(0);
  2711.         gback(2);           /* Background to Red */
  2712.  
  2713.         gbox(10,10,20,20,1);      /* Green Box at 10,10 */
  2714.  
  2715.  
  2716.  
  2717.                                                              gcircle
  2718.         Summary:
  2719.  
  2720.         void gcircle(x,y,r,clr);
  2721.         int x;                   /* Row of Center */
  2722.         int y;                   /* Column of Center */
  2723.         int r;                   /* Radius of Circle */
  2724.         int clr;                 /* Color for Box */
  2725.  
  2726.         Created: 10/31/86        Last Updated: 07/12/88
  2727.  
  2728.         Author:                  Source in: GCIRCLE.C
  2729.  
  2730.         Requires: gdot()
  2731.  
  2732.         Description:
  2733.  
  2734.         This  routine  draws a circle at the given row and column in  the
  2735.         specified color with the given radius.   This routine assumes  an
  2736.         aspect  ratio  of  1,  and consequently  will  generate  slightly
  2737.         eliptical circles on an IBM PC.
  2738.  
  2739.         See Also:
  2740.  
  2741.         ginit() gline() gdot() gpal()
  2742.  
  2743.         Example:
  2744.  
  2745.         ginit();
  2746.         gpal(0);
  2747.         gback(2);           /* Background to Red */
  2748.  
  2749.         gcircle(100,150,10,1);   /* Green Circle with radius of 10. */
  2750.  
  2751.  
  2752.  
  2753.                                                                 gdot
  2754.         Summary:
  2755.  
  2756.         int gdot(x,y,clr);
  2757.         int x;                   /* Row */
  2758.         int y;                   /* Column */
  2759.         int clr;                 /* Color */
  2760.  
  2761.         Created: 10/31/86        Last Updated: 07/12/88
  2762.  
  2763.         Author: Bob Pritchett    Source in: GDOT.ASM
  2764.  
  2765.         Requires: Nothing.
  2766.  
  2767.         Description:
  2768.  
  2769.         This function puts a graphic dot at the row and column specified.
  2770.         The color may be 0-3 in medium resulution,  or 0-1 in high.   See
  2771.         the  descriptions of gpal() and ginit() for a list of colors  and
  2772.         maximum coordinate values.
  2773.  
  2774.         Return Value:
  2775.  
  2776.         Nothing.
  2777.  
  2778.         See Also:
  2779.  
  2780.         ginit() gline() gback() gpal()
  2781.  
  2782.         Example:
  2783.  
  2784.         ginit();
  2785.         gpal(0);
  2786.  
  2787.         gdot(10,10,2);
  2788.  
  2789.  
  2790.  
  2791.                                                             get_date
  2792.         Summary:
  2793.  
  2794.         void get_date(dy,mn,yr);
  2795.         int *dy;                 /* Location of Day */
  2796.         int *mn;                 /* Location of Month */
  2797.         int *yr;                 /* Location of Year */
  2798.  
  2799.         Created: 03/31/86        Last Updated: 07/12/88
  2800.  
  2801.         Author: Bob Pritchett    Source in: GET_DATE.C
  2802.  
  2803.         Requires: intdos()
  2804.  
  2805.         Description:
  2806.  
  2807.         This  routine obtains the current date by using the DOS interrupt
  2808.         0x2a, and places it into the variables specified.  The day starts
  2809.         with numbering with 1, and continue to a maximum of 31, the month
  2810.         is numbered from 1 to 12, and the year is from 1980 to 2099.
  2811.  
  2812.         See Also:
  2813.  
  2814.         get_dow() set_date() get_time()
  2815.  
  2816.         Example:
  2817.  
  2818.         int d;
  2819.         int m;
  2820.         int y;
  2821.  
  2822.         get_date(&d,&m,&y);
  2823.  
  2824.         printf("Today is %d/%d/%d.\n",m,d,y);
  2825.  
  2826.  
  2827.  
  2828.                                                              get_dow
  2829.         Summary:
  2830.  
  2831.         int get_dow();
  2832.  
  2833.         Created: 03/31/86        Last Updated: 07/12/88
  2834.  
  2835.         Author: Bob Pritchett    Source in: GET_DOW.C
  2836.  
  2837.         Requires: intdos()
  2838.  
  2839.         Description:
  2840.  
  2841.         This  routine returns the day of the week,  0 for sunday,  1  for
  2842.         monday, etc.  It is obtained with a DOS interrupt.
  2843.  
  2844.         Return Value:
  2845.  
  2846.         The numerical value for the current day of the week is returned.
  2847.  
  2848.         See Also:
  2849.  
  2850.         get_date() get_time()
  2851.  
  2852.         Example:
  2853.  
  2854.         printf("Today is the %d day of the week.\n",get_dow());
  2855.  
  2856.  
  2857.  
  2858.                                                            get_drive
  2859.         Summary:
  2860.  
  2861.         int get_drive();
  2862.  
  2863.         Created: 04/04/86        Last Updated: 07/12/88
  2864.  
  2865.         Author: Bob Pritchett    Source in: GETDRIVE.ASM
  2866.  
  2867.         Requires: Nothing.
  2868.  
  2869.         Description:
  2870.  
  2871.         This  function returns a single integer representing the  current
  2872.         logical drive.  The drives are number from 0, as in 0 = A, 1 = B,
  2873.         2 = C,  etc.   Remember that even with only one floppy,  DOS will
  2874.         still  have  an A and B drive,  with the single floppy acting  as
  2875.         both.
  2876.  
  2877.         Return Value:
  2878.  
  2879.         The current drive.
  2880.  
  2881.         See Also:
  2882.  
  2883.         set_drive() num_drives()
  2884.  
  2885.         Example:
  2886.  
  2887.         printf("Current Drive is: %c:\n",'A'+get_drive());
  2888.  
  2889.  
  2890.  
  2891.                                                             get_mode
  2892.         Summary:
  2893.  
  2894.         int get_mode();
  2895.  
  2896.         Created: 04/16/86        Last Updated: 07/12/88
  2897.  
  2898.         Author: Bob Pritchett    Source in: GETMODE.ASM
  2899.  
  2900.         Requires: Nothing.
  2901.  
  2902.         Description:
  2903.  
  2904.         This function returns the current video mode.
  2905.  
  2906.         Return Value:
  2907.  
  2908.         The current video mode.
  2909.  
  2910.         See Also:
  2911.  
  2912.         set_mode()
  2913.  
  2914.         Example:
  2915.  
  2916.         #include <stdio.h>
  2917.  
  2918.         printf("Current video mode is: %d\n",get_mode());
  2919.  
  2920.  
  2921.  
  2922.                                                                getpw
  2923.         Summary:
  2924.  
  2925.         int getpw(pass);
  2926.         char *pass;              /* The Password to Check Against */
  2927.  
  2928.         Created: 04/13/86        Last Updated: 07/12/88
  2929.  
  2930.         Author: Bob Pritchett    Source in: GETPW.C
  2931.  
  2932.         Requires: Windowing routines and getch().
  2933.  
  2934.         Description:
  2935.  
  2936.         This  function opens a small blue and white window in the  center
  2937.         of  the  screen and inputs a password up to  eighteen  characters
  2938.         long.   As  each  character  is inputed an  asterisk  is  echoed.
  2939.         Backspace editing is permitted.  If the entered password is equal
  2940.         to  the  specified password (case ignored) the funtion returns  a
  2941.         one, otherwise it returns a 0 on failure.
  2942.  
  2943.         Return Value:
  2944.  
  2945.         1 if the correct password is entered, 0 if not.
  2946.  
  2947.         Example:
  2948.  
  2949.         if ( getpw("pass") == 0 )
  2950.            printf("** Access Denied **\n");
  2951.  
  2952.  
  2953.  
  2954.                                                             get_time
  2955.         Summary:
  2956.  
  2957.         void get_time(hr,mn,sc,hn);
  2958.         int *hr;                 /* Location of Hour */
  2959.         int *mn;                 /* Location of Minutes */
  2960.         int *sc;                 /* Location of Seconds */
  2961.         int *hn;                 /* Location of Hundredths */
  2962.  
  2963.         Created: 03/31/86        Last Updated: 07/12/88
  2964.  
  2965.         Author: Bob Pritchett    Source in: GET_TIME.C
  2966.  
  2967.         Requires: Nothing.
  2968.  
  2969.         Description:
  2970.  
  2971.         Using  DOS interrupt 0x2c this routine obtains the current  time,
  2972.         to the hundredths, and places it in the variables specified.  The
  2973.         time  is given in 24 hour format,  and everything starts counting
  2974.         at 0, 0 to 23 hours, 0 to 59 seconds etc.
  2975.  
  2976.         See Also:
  2977.  
  2978.         get_dow() get_date() set_time()
  2979.  
  2980.         Example:
  2981.  
  2982.         int h;
  2983.         int m;
  2984.         int s;
  2985.         int hn;
  2986.  
  2987.         get_time(&h,&m,&s,&hn);
  2988.  
  2989.         printf("The time is %d:%d:%d.%d.\n",h,m,s,hn);
  2990.  
  2991.  
  2992.  
  2993.                                                            get_timer
  2994.         Summary:
  2995.  
  2996.         long get_timer();
  2997.  
  2998.         Created: 01/03/87        Last Updated: 07/12/88
  2999.  
  3000.         Author: Dave Perras      Source in: TIMERS.C
  3001.  
  3002.         Requires: Nothing.
  3003.  
  3004.         Description:
  3005.  
  3006.         This function is used by the other timer routines in order to get
  3007.         the value of the real time clock.  All DOS and compiler specifics
  3008.         concerning the timer routines are contained in this routine.
  3009.  
  3010.         Return Value:
  3011.  
  3012.         A  long value is returned holding the number of clock ticks  from
  3013.         the real time clock counter.
  3014.  
  3015.         See Also:
  3016.  
  3017.         start_tmr() stop_tmr() read_tmr() reset_tmr() zero_tmr() timer()
  3018.         init_tmr()
  3019.  
  3020.         Example:
  3021.  
  3022.         long ltime;
  3023.  
  3024.         ltime = get_timer();
  3025.  
  3026.  
  3027.  
  3028.                                                                gfbox
  3029.         Summary:
  3030.  
  3031.         void gfbox(x,y,x2,y2,clr);
  3032.         int x;                   /* Upper Left Row */
  3033.         int y;                   /* Upper Left Column */
  3034.         int x2;                  /* Lower Right Row */
  3035.         int y2;                  /* Lower Right Column */
  3036.         int clr;                 /* Color for Box */
  3037.  
  3038.         Created: 11/01/86        Last Updated: 07/12/88
  3039.  
  3040.         Author: Bob Pritchett    Source in: GFBOX.C
  3041.  
  3042.         Requires: gline()
  3043.  
  3044.         Description:
  3045.  
  3046.         This  function is identical to gbox() with the exception that the
  3047.         box created is filled in with the specified color.
  3048.  
  3049.         See Also:
  3050.  
  3051.         ginit() gline() gpal() gbox()
  3052.  
  3053.         Example:
  3054.  
  3055.         ginit();
  3056.         gpal(0);
  3057.         gback(2);           /* Background to Red */
  3058.  
  3059.         gfbox(10,10,20,20,1);      /* Solid Green Box at 10,10 */
  3060.  
  3061.  
  3062.  
  3063.                                                                ginit
  3064.         Summary:
  3065.  
  3066.         int ginit();
  3067.  
  3068.         Created: 10/31/86        Last Updated: 07/12/88
  3069.  
  3070.         Author: Bob Pritchett    Source in: GINIT.C
  3071.  
  3072.         Requires: Nothing.
  3073.  
  3074.         Description:
  3075.  
  3076.         This  function sets up the screen on a CGA for medium  resolution
  3077.         graphics.   It is the exact equivalent of set_mode(4).  To set up
  3078.         for high resolution graphics, use the command set_mode(6) instead
  3079.         of ginit().
  3080.  
  3081.         Return Value:
  3082.  
  3083.         Nothing.
  3084.  
  3085.         See Also:
  3086.  
  3087.         set_mode() gback() gdot() gpal()
  3088.  
  3089.         Example:
  3090.  
  3091.         ginit();            /* Medium Resolution Screen */
  3092.         gpal(0);
  3093.         gback(2);           /* Background to Red */
  3094.  
  3095.         gcircle(100,150,10,1);   /* Green Circle with radius of 10. */
  3096.  
  3097.  
  3098.  
  3099.                                                                gline
  3100.         Summary:
  3101.  
  3102.         void gline(x,y,x2,y2,clr);
  3103.         int x;                   /* Starting Row */
  3104.         int y;                   /* Starting Column */
  3105.         int x2;                  /* Ending Row */
  3106.         int y2;                  /* Ending Column */
  3107.         int clr;                 /* Color of Line */
  3108.  
  3109.         Created:   /  /          Last Updated:   07/12/88
  3110.  
  3111.         Author: Dan Rollins      Source in: GLINE.C
  3112.  
  3113.         Requires: gdot()
  3114.  
  3115.         Description:
  3116.  
  3117.         This routine,  found in the Febuary,  1986,  Dr.  Dobb's Journal,
  3118.         plots  a  line from the first to the second set  of  coordinates.
  3119.         The first set of coordinates needn't be lower than the second.
  3120.  
  3121.         See Also:
  3122.  
  3123.         gcircle() gback() gdot() gpal()
  3124.  
  3125.         Example:
  3126.  
  3127.         ginit();            /* Medium Resolution Screen */
  3128.         gpal(0);
  3129.         gback(2);           /* Background to Red */
  3130.  
  3131.         gline(10,10,50,50,1);    /* A Diagonal Green Line */
  3132.  
  3133.  
  3134.  
  3135.                                                               gotoxy
  3136.         Summary:
  3137.  
  3138.         int gotoxy(row,col);
  3139.         int row;                 /* Screen Row */
  3140.         int col;                 /* Screen Column */
  3141.  
  3142.         Created: 00/00/00        Last Updated: 07/12/88
  3143.  
  3144.         Author:                  Source in: GOTOXY.ASM
  3145.  
  3146.         Requires: Nothing
  3147.  
  3148.         Description:
  3149.  
  3150.         The gotoxy function will set the cursor to the screen coordinates
  3151.         specified  in row and col,  regardless of windows or other  high-
  3152.         level screen manipulation.
  3153.  
  3154.         Service two of the bios video interrupt 0x10 is used.
  3155.  
  3156.         Return Value:
  3157.  
  3158.         This  routine  returns  nothing,  and does not  check  coordinate
  3159.         validity.
  3160.  
  3161.         See Also:
  3162.  
  3163.         wgotoxy()
  3164.  
  3165.         Example:
  3166.  
  3167.         #include <stdio.h>
  3168.  
  3169.         int row;
  3170.         int col;
  3171.  
  3172.         row = 10;
  3173.         col = 20;
  3174.  
  3175.         gotoxy(row,col);
  3176.  
  3177.         printf("I am now at Column 20 on Row 10.\n");
  3178.  
  3179.  
  3180.  
  3181.                                                                 gpal
  3182.         Summary:
  3183.  
  3184.         int gpal(palette);
  3185.         int palette;             /* Color Palette to Use */
  3186.  
  3187.         Created: 10/31/86        Last Updated: 07/12/88
  3188.  
  3189.         Author: Bob Pritchett    Source in: GPAL.ASM
  3190.  
  3191.         Requires: Nothing.
  3192.  
  3193.         Description:
  3194.  
  3195.         This  routine  sets the current color palette for use  in  medium
  3196.         resolution  graphics.   (In  high  resolution graphics  the  only
  3197.         choices are on one palette, 0 for black, 1 for white.)
  3198.  
  3199.                   Palette 0:               Palette 1:
  3200.                   (0) Background Color     (0) Background Color
  3201.                   (1) Green                (1) Cyan
  3202.                   (2) Red                  (2) Magenta
  3203.                   (3) Brown                (3) White
  3204.  
  3205.         Return Value:
  3206.  
  3207.         Nothing.
  3208.  
  3209.         See Also:
  3210.  
  3211.         ginit() gback() gdot()
  3212.  
  3213.         Example:
  3214.  
  3215.         ginit();            /* Medium Resolution Screen */
  3216.         gpal(0);
  3217.         gback(2);           /* Background to Red */
  3218.  
  3219.         gline(10,10,50,50,3);    /* A Diagonal Brown Line */
  3220.  
  3221.  
  3222.  
  3223.                                                             init_tmr
  3224.         Summary:
  3225.  
  3226.         unsigned init_tmr();
  3227.  
  3228.         Created: 01/03/87        Last Updated: 07/12/88
  3229.  
  3230.         Author: Dave Perras      Source in: TIMERS.C
  3231.  
  3232.         Requires: get_timer()
  3233.  
  3234.         Description:
  3235.  
  3236.         This  function  must  be called before any  of  the  other  timer
  3237.         functions  are  called.   It tests the real time clock to  ensure
  3238.         that it is operating,  clears the ten timers to zero and sets  an
  3239.         internal flag to show that the timers have been initialized.
  3240.  
  3241.         Return Value:
  3242.  
  3243.         This function returns the elapsed time (in tenths of seconds) for
  3244.         16000 iterations of an empty "for" loop.   If the real time clock
  3245.         is diagnosed as not working, and error value of zero is returned.
  3246.  
  3247.         See Also:
  3248.  
  3249.         start_tmr() stop_tmr() read_tmr() reset_tmr() zero_tmr()
  3250.         get_timer()
  3251.  
  3252.         Example:
  3253.  
  3254.         #include <stdio.h>
  3255.  
  3256.         if ( ! init_tmr() )
  3257.            fprintf(stderr,"Real Time Clock Error\n");
  3258.  
  3259.  
  3260.  
  3261.                                                              inptint
  3262.         Summary:
  3263.  
  3264.         int inptint(prompt);
  3265.         char *prompt;            /* Prompt for Input */
  3266.  
  3267.         Created: 08/16/86        Last Updated: 07/12/88
  3268.  
  3269.         Author: Bob Pritchett    Source in: INPUT.C
  3270.  
  3271.         Requires: Nothing.
  3272.  
  3273.         Description:
  3274.  
  3275.         This  function  displays the prompt given at the  current  cursor
  3276.         location  using  stdout  and then inputs  an  integer.   After  a
  3277.         carriage  return  (with mandatory input of an integer) the  value
  3278.         entered is returned.
  3279.  
  3280.         Return Value:
  3281.  
  3282.         The integer inputted.
  3283.  
  3284.         See Also:
  3285.  
  3286.         inptintd() inptintr() inptintrd()
  3287.  
  3288.         Example:
  3289.  
  3290.         printf("inptint() returns: %d.\n",inptint("Enter Integer:"));
  3291.  
  3292.              /* The above function prompts "Enter Integer: " and then */
  3293.              /* executes the printf statement. */
  3294.  
  3295.  
  3296.  
  3297.                                                             inptintd
  3298.         Summary:
  3299.  
  3300.         int inptintd(prompt,def);
  3301.         char *prompt;            /* Prompt for Input */
  3302.         int def;                 /* Default Integer */
  3303.  
  3304.         Created: 08/16/86        Last Updated: 07/12/88
  3305.  
  3306.         Author: Bob Pritchett    Source in: INPUT.C
  3307.  
  3308.         Requires: Nothing.
  3309.  
  3310.         Description:
  3311.  
  3312.         This  function displays the prompt given followed by the  default
  3313.         integer.   If a carriage return is entered as the first character
  3314.         the  default  integer  will be  returned.   If  any  other  valid
  3315.         character  is entered the default will be erased and the user may
  3316.         enter an integer value.
  3317.  
  3318.         Return Value:
  3319.  
  3320.         The integer inputted, or the default.
  3321.  
  3322.         See Also:
  3323.  
  3324.         inptint() inptintr() inptintrd()
  3325.  
  3326.         Example:
  3327.  
  3328.         printf("inptintd() returns: %d.\n",inptintd("Enter Integer:",9));
  3329.  
  3330.              /* The above function prompts "Enter Integer: " and then */
  3331.              /* executes the printf statement. */
  3332.  
  3333.  
  3334.  
  3335.                                                             inptintr
  3336.         Summary:
  3337.  
  3338.         int inptintr(prompt,low,high);
  3339.         char *prompt;            /* Prompt for Input */
  3340.         int low;                 /* Lowest Acceptable Input */
  3341.         int high;                /* Highest Acceptable Input */
  3342.  
  3343.         Created: 08/16/86        Last Updated: 07/12/88
  3344.  
  3345.         Author: Bob Pritchett    Source in: INPUT.C
  3346.  
  3347.         Requires: Nothing.
  3348.  
  3349.         Description:
  3350.  
  3351.         After  displaying the prompt specified this function  will  input
  3352.         and  integer  in the same manner as inptint(),  only checking  to
  3353.         make sure that the value inputted is within the range given.   If
  3354.         it is not equal to or within this range the function will  prompt
  3355.         for another integer until a valid one is entered.
  3356.  
  3357.         Return Value:
  3358.  
  3359.         The integer inputted, within the specified range.
  3360.  
  3361.         See Also:
  3362.  
  3363.         inptint() inptintd() inptintrd()
  3364.  
  3365.         Example:
  3366.  
  3367.         printf("inptintr() returns: %d.\n",inptintr("Enter Integer:"
  3368.                ,5,62));
  3369.  
  3370.              /* The above function prompts "Enter Integer: " and then */
  3371.              /* executes the printf statement.  The returned value */
  3372.              /* will be greater than 4 and less than 63. */
  3373.  
  3374.  
  3375.  
  3376.                                                            inptintrd
  3377.         Summary:
  3378.  
  3379.         int inptintrd(prompt,low,high,def);
  3380.         char *prompt;            /* Prompt for Input */
  3381.         int low;                 /* Lowest Acceptable Input */
  3382.         int high;                /* Highest Acceptable Input */
  3383.         int def;                 /* Default Value */
  3384.  
  3385.         Created: 08/16/86        Last Updated: 07/12/88
  3386.  
  3387.         Author: Bob Pritchett    Source in: INPUT.C
  3388.  
  3389.         Requires: Nothing.
  3390.  
  3391.         Description:
  3392.  
  3393.         This function displays the default integer value after the prompt
  3394.         and  then returns either the default integer or a  user  inputted
  3395.         value  within  the specified range.   The input follows the  same
  3396.         rules as inptintd() and inptintr().
  3397.  
  3398.         Return Value:
  3399.  
  3400.         The integer inputted, or the default, within the specified range.
  3401.  
  3402.         See Also:
  3403.  
  3404.         inptint() inptintd() inptintr()
  3405.  
  3406.         Example:
  3407.  
  3408.         printf("inptintrd() returns: %d.\n",inptintrd("Enter Integer:"
  3409.                ,8,50,30));
  3410.  
  3411.              /* The above function prompts "Enter Integer: 30" and */
  3412.              /* then executes the printf statement.  The returned */
  3413.              /* value will be greater than 7 and less than 51. */
  3414.  
  3415.  
  3416.  
  3417.                                                              inptstr
  3418.         Summary:
  3419.  
  3420.         char *inptstr(prompt);
  3421.         char *prompt;            /* Prompt for Input */
  3422.  
  3423.         Created: 08/25/86        Last Updated: 07/12/88
  3424.  
  3425.         Author: Bob Pritchett    Source in: INPUT.C
  3426.  
  3427.         Requires: Nothing.
  3428.  
  3429.         Description:
  3430.  
  3431.         After  displaying  the  given prompt this function waits  for  an
  3432.         input string.   Nothing longer than 80 characters will be handled
  3433.         correctly,  and the routine will beep at a carriage return in the
  3434.         first column,  making some input mandatory.   For functions  with
  3435.         more control over input parameters, see inptstrd() and finptstr()
  3436.         and related routines.
  3437.  
  3438.         Return Value:
  3439.  
  3440.         The character string inputted.
  3441.  
  3442.         See Also:
  3443.  
  3444.         inptstrd() finptstr() finptstrd() finptstre() finptstred()
  3445.  
  3446.         Example:
  3447.  
  3448.         printf("Hello there, %s.\n",inptstr("Your name?"));
  3449.  
  3450.  
  3451.  
  3452.                                                             inptstrd
  3453.         Summary:
  3454.  
  3455.         char *inptstrd(prompt,def);
  3456.         char *prompt;            /* Prompt for Input */
  3457.         char *def;               /* Default String */
  3458.  
  3459.         Created: 08/25/86        Last Updated: 07/12/88
  3460.  
  3461.         Author: Bob Pritchett    Source in: INPUT.C
  3462.  
  3463.         Requires: Nothing.
  3464.  
  3465.         Description:
  3466.  
  3467.         This  function  acts  in the same manner as  inptstr()  with  the
  3468.         exception  that  a default string may be specified,  and  at  the
  3469.         choice  of the user this string may be returned instead of a user
  3470.         entered string.   When the function is called the default  string
  3471.         is displayed immediately following the prompt,  and the cursor is
  3472.         placed  at  the  first character of the string.   If  a  carriage
  3473.         return  is entered as the first inputted character,  the  default
  3474.         string is returned.   Any other key causes the default string  to
  3475.         be  erased and a user entered string may be inputted.
  3476.  
  3477.         Return Value:
  3478.  
  3479.         The character string inputted, or the default string.
  3480.  
  3481.         See Also:
  3482.  
  3483.         inptstr() finptstr() finptstrd() finptstre() finptstred()
  3484.  
  3485.         Example:
  3486.  
  3487.         printf("Hello there, %s.\n",inptstrd("Your name?","Richard"));
  3488.  
  3489.  
  3490.  
  3491.                                                               inptyn
  3492.         Summary:
  3493.  
  3494.         int inptyn(prompt);
  3495.         char *prompt;            /* Prompt for Input */
  3496.  
  3497.         Created: 08/16/86        Last Updated: 07/12/88
  3498.  
  3499.         Author: Bob Pritchett    Source in: INPUT.C
  3500.  
  3501.         Requires: Nothing.
  3502.  
  3503.         Description:
  3504.  
  3505.         This function displays the given prompt and then waits for either
  3506.         a  Y  or  an  N in reply.   A single character  is  all  that  is
  3507.         inputted,  and a Y or N must be entered.  If a Y is entered a one
  3508.         is returned, if an N is entered a zero is returned.
  3509.  
  3510.         Return Value:
  3511.  
  3512.         A one or zero, dependent on the inputted character.
  3513.  
  3514.         See Also:
  3515.  
  3516.         inptynd() finptyn() finptynd();
  3517.  
  3518.         Example:
  3519.  
  3520.         if ( inptyn("Do you program microcomputers?") )
  3521.            printf("Oh, you do.");
  3522.  
  3523.              /* Prompts 'Do you program microcomputers? (Y/N) ' */
  3524.  
  3525.  
  3526.  
  3527.                                                             inptynd
  3528.         Summary:
  3529.  
  3530.         int inptynd(prompt,x);
  3531.         char *prompt;            /* Prompt for Input */
  3532.         int x;                   /* Default Answer */
  3533.  
  3534.         Created: 08/16/86        Last Updated: 07/12/88
  3535.  
  3536.         Author: Bob Pritchett    Source in: INPUT.C
  3537.  
  3538.         Requires: Nothing.
  3539.  
  3540.         Description:
  3541.  
  3542.         This  function  works just like inptyn() except that the  default
  3543.         response  is  the uppercase letter in the prompt  which  will  be
  3544.         returned if a carriage return is entered instead of a Y or N.
  3545.  
  3546.         Return Value:
  3547.  
  3548.         A  one  or  zero,  dependent on the inputted  character,  or  the
  3549.         default.
  3550.  
  3551.         See Also:
  3552.  
  3553.         inptyn() finptyn() finptynd();
  3554.  
  3555.         Example:
  3556.  
  3557.         if ( inptyn("Do you program microcomputers?",1) )
  3558.            printf("Oh, you do.");
  3559.  
  3560.              /* Prompts 'Do you program microcomputers? (Y/n) ' */
  3561.  
  3562.  
  3563.  
  3564.                                                               isleap
  3565.         Summary:
  3566.  
  3567.         int isleap(y);
  3568.         int y;                   /* Year */
  3569.  
  3570.         Created: 09/01/86        Last Updated: 07/12/88
  3571.  
  3572.         Author: George Roukas    Source in: CSRDATE.C
  3573.  
  3574.         Requires: Nothing.
  3575.  
  3576.         Description:
  3577.  
  3578.         This function will tell if the specified year (four or two  digit
  3579.         format) is a leap year.
  3580.  
  3581.         Return Value:
  3582.  
  3583.         Returns a one if it is a leap year, zero if it is not.
  3584.  
  3585.         Example:
  3586.  
  3587.         int x = 1986;
  3588.  
  3589.         if ( isleap(x) )
  3590.            printf("%d is a leap year.\n");
  3591.  
  3592.  
  3593.  
  3594.                                                               iswild
  3595.         Summary:
  3596.  
  3597.         #include "csrmisc.h"     /* Header File Containing the Macro */
  3598.  
  3599.         int iswild(c);
  3600.         int c;                   /* Character to Test */
  3601.  
  3602.         Created: 12/05/86        Last Updated: 07/12/88
  3603.  
  3604.         Author: Bob Pritchett    Source in: CSRMISC.H
  3605.  
  3606.         Requires: Nothing.
  3607.  
  3608.         Description:
  3609.  
  3610.         This  macro evaluates positive if the given character is a '?' or
  3611.         an '*'.
  3612.  
  3613.         Return Value:
  3614.  
  3615.         Acts positive if the character is a wildcard, negative if not.
  3616.  
  3617.         See Also:
  3618.  
  3619.         istemplate()
  3620.  
  3621.         Example:
  3622.  
  3623.         if ( iswild('?') )
  3624.            printf("This character is a wild card.\n");
  3625.  
  3626.                   /* The printf statement is executed. */
  3627.  
  3628.  
  3629.  
  3630.                                                           istemplate
  3631.         Summary:
  3632.  
  3633.         int istemplate(str);
  3634.         char *str;               /* String to Evaluate */
  3635.  
  3636.         Created: 12/05/86        Last Updated: 07/12/88
  3637.  
  3638.         Author: Bob Pritchett    Source in: WILDCARD.C
  3639.  
  3640.         Requires: Nothing.
  3641.  
  3642.         Description:
  3643.  
  3644.         This  function returns a one if a wildcard is encountered  within
  3645.         the  given string.   By using this function it can be  determined
  3646.         whether a file may be opened or if the string should be passed to
  3647.         the ffirst() and fnext() routines.
  3648.  
  3649.         Return Value:
  3650.  
  3651.         Returns a one if a wildcard is encountered, zero if not.
  3652.  
  3653.         See Also:
  3654.  
  3655.         iswild()
  3656.  
  3657.         Example:
  3658.  
  3659.         if ( istemplate("file*.e?w") )
  3660.            printf("The filename given is a template.\n");
  3661.  
  3662.                   /* The printf statement is executed. */
  3663.  
  3664.  
  3665.  
  3666.                                                                itofa
  3667.         Summary:
  3668.  
  3669.         char *itofa(x,str);
  3670.         int x;                   /* Integer to Format */
  3671.         char *str;               /* Location to Place String */
  3672.  
  3673.         Created: 11/07/85        Last Updated: 07/12/88
  3674.  
  3675.         Author: Bob Pritchett    Source in: ITOFA.C
  3676.  
  3677.         Requires: Nothing.
  3678.  
  3679.         Description:
  3680.  
  3681.         This  function  takes an integer and returns a string  with  that
  3682.         integer formatted with commas.  The string is placed in str and a
  3683.         pointer is returned to it.
  3684.  
  3685.         Return Value:
  3686.  
  3687.         Returns a pointer to the formatted string.
  3688.  
  3689.         See Also:
  3690.  
  3691.         ltofa()
  3692.  
  3693.         Example:
  3694.  
  3695.         int x = 12526;
  3696.         char temp[10];
  3697.  
  3698.         printf("There are %s people in this county.\n",itofa(x,temp));
  3699.  
  3700.              /* Returns "12,526". */
  3701.  
  3702.  
  3703.  
  3704.                                                               lprint
  3705.         Summary:
  3706.  
  3707.         void lprint(string);
  3708.         char *string;            /* String to Print */
  3709.  
  3710.         Created: 03/10/86        Last Updated: 07/12/88
  3711.  
  3712.         Author: Bob Pritchett    Source in: PRINT.C
  3713.  
  3714.         Requires: lputchar()
  3715.  
  3716.         Description:
  3717.  
  3718.         This  function simply prints the string to the printer.   Nothing
  3719.         other then the standard escape codes are recognized.
  3720.  
  3721.         See Also:
  3722.  
  3723.         wprint()
  3724.  
  3725.         Example:
  3726.  
  3727.         lprint("This string has no formatting at all.\n");
  3728.  
  3729.  
  3730.  
  3731.                                                              lprintf
  3732.         Summary:
  3733.  
  3734.         void lprintf(string[,arguments...]);
  3735.         char *string;            /* Format String to Print */
  3736.  
  3737.         Created: 03/10/86        Last Updated: 07/12/88
  3738.  
  3739.         Author: Bob Pritchett    Source in: PRINT.C
  3740.  
  3741.         Requires: Nothing.
  3742.  
  3743.         Description:
  3744.  
  3745.         This function is a version of the familiar printf() function that
  3746.         prints  directly to the printer.   (Note that DOS function  5  is
  3747.         used,  it  is  not  done through file  pointers.)   The  argument
  3748.         formatting should be in the same format as for printf().
  3749.  
  3750.         See Also:
  3751.  
  3752.         lprint() wprintf()
  3753.  
  3754.         Example:
  3755.  
  3756.         lprintf("This goes to the printer: %02d %5s\n",6,"Wow");
  3757.  
  3758.  
  3759.  
  3760.                                                             lputchar
  3761.         Summary:
  3762.  
  3763.         void lputchar(c);
  3764.         int c;                   /* Character to Print */
  3765.  
  3766.         Created: 03/10/86        Last Updated: 07/12/88
  3767.  
  3768.         Author: Bob Pritchett    Source in: PRINT.C
  3769.  
  3770.         Requires: bdos()
  3771.  
  3772.         Description:
  3773.  
  3774.         Using the bdos call five this routine simply puts the character c
  3775.         to the printer.  It is called by lprint().
  3776.  
  3777.         See Also:
  3778.  
  3779.         lprint() lprintf()
  3780.  
  3781.         Example:
  3782.  
  3783.         lputchar('\r');
  3784.  
  3785.  
  3786.  
  3787.                                                                ltofa
  3788.         Summary:
  3789.  
  3790.         char *ltofa(x,str);
  3791.         long x;                  /* Long to Format */
  3792.         char *str;               /* Location to Place String */
  3793.  
  3794.         Created: 11/07/85        Last Updated: 07/12/88
  3795.  
  3796.         Author: Bob Pritchett    Source in: LOTFA.C
  3797.  
  3798.         Requires: Nothing.
  3799.  
  3800.         Description:
  3801.  
  3802.         Performing  just like itofa(),  this function formats  the  given
  3803.         number into an ASCII string with commas.
  3804.  
  3805.         Return Value:
  3806.  
  3807.         Returns a pointer to the formatted string.
  3808.  
  3809.         See Also:
  3810.  
  3811.         itofa()
  3812.  
  3813.         Example:
  3814.  
  3815.         long x = 2364736;
  3816.         char temp[15];
  3817.  
  3818.         printf("There are %s apples in this county.\n",ltofa(x,temp));
  3819.  
  3820.              /* Returns "2,364,736". */
  3821.  
  3822.  
  3823.  
  3824.                                                                match
  3825.         Summary:
  3826.  
  3827.         int match(pat,str,start);
  3828.         char pat[];              /* Pattern to Search for */
  3829.         char str[];              /* String to Search in */
  3830.         int start;               /* Character to Start on */
  3831.  
  3832.         Created: 11/23/85        Last Updated: 07/12/88
  3833.  
  3834.         Author: Bob Pritchett    Source in: MATCH.C
  3835.  
  3836.         Requires: strlen()
  3837.  
  3838.         Description:
  3839.  
  3840.         The  match() function searches the string str for the string pat,
  3841.         and  returns  an integer value of the first place  pat  is  found
  3842.         within  str.   By  changing the variable start from  it's  normal
  3843.         useage  as  0,  you may begin the search from a certain place  in
  3844.         str.   The following wildcards are acceptable within pat:
  3845.  
  3846.                   #  Any digit from 1-9, and 0
  3847.                   ?  Any character at all
  3848.                   !  Any upper-case letter
  3849.                   ^  Any control character
  3850.  
  3851.         Return Value:
  3852.  
  3853.         Returns the first place that pat is found within str.
  3854.  
  3855.         Example:
  3856.  
  3857.         x = match("a?c","xyzabc",0);  /* x = 3, where abc begins. */
  3858.  
  3859.  
  3860.  
  3861.                                                               mcolor
  3862.         Summary:
  3863.  
  3864.         #include "color.h"       /* For Color Definitions Only */
  3865.  
  3866.         void mcolor(norm,bar);
  3867.         int norm;                /* Color Used for Menu Options */
  3868.         int bar;                 /* Color for Hightlight Bar */
  3869.  
  3870.         Created: 04/16/86        Last Updated: 07/12/88
  3871.  
  3872.         Author: Bob Pritchett    Source in: POPMENU.C
  3873.  
  3874.         Requires: Nothing.
  3875.  
  3876.         Description:
  3877.  
  3878.         This  function sets the colors to be used by pop_menu() and  it's
  3879.         scrolling highlight bar.  The variable norm contains the complete
  3880.         attribute for each option, and bar for the highlight bar.
  3881.  
  3882.         See Also:
  3883.  
  3884.         color() wcolor()
  3885.  
  3886.         Example:
  3887.  
  3888.         #include "color.h"
  3889.  
  3890.         mcolor(WHT_F+BLU_B,YEL_F+RED_B);
  3891.  
  3892.  
  3893.  
  3894.                                                              message
  3895.         Summary:
  3896.  
  3897.         int message(mess,x);
  3898.         char *mess;              /* Message to Display */
  3899.         int x;                   /* Flag for Window Message */
  3900.  
  3901.         Created: 08/09/86        Last Updated: 07/12/88
  3902.  
  3903.         Author: Bob Pritchett    Source in: MESSAGE.C
  3904.  
  3905.         Requires: Nothing.
  3906.  
  3907.         Description:
  3908.  
  3909.         This  function  opens  a small window in the  current  color  and
  3910.         displays the string specified in mess.   If the variable x is set
  3911.         to one, the message "[ Hit a Key ]" is displayed on the bottom of
  3912.         the  window.   A single keystroke closes the window,  and the key
  3913.         value is returned.
  3914.  
  3915.         Return Value:
  3916.  
  3917.         The key used to close the window.
  3918.  
  3919.         Example:
  3920.  
  3921.         message("**  Attempt to Open File Failed **",1);
  3922.  
  3923.  
  3924.  
  3925.                                                            month_day
  3926.         Summary:
  3927.  
  3928.         void month_day(yr,yd,m,d);
  3929.         int yr;                  /* Year To Calculate For */
  3930.         int yd;                  /* Number of Days Elapsed in Year */
  3931.         int *m;                  /* Where to Store Month */
  3932.         int *d;                  /* Where to Store Day */
  3933.  
  3934.         Created: 09/01/86        Last Updated: 07/12/88
  3935.  
  3936.         Author: George Roukas    Source in: CSRDATE.C
  3937.  
  3938.         Requires: isleap()
  3939.  
  3940.         Description:
  3941.  
  3942.         Similar  to the K&R (pp 103-104) routine of the same  name,  this
  3943.         function  calculates the menth and day of the year when given the
  3944.         year and number of days elapsed in that year.
  3945.  
  3946.         See Also:
  3947.  
  3948.         date_sn() sn_date() isleap()
  3949.  
  3950.         Example:
  3951.  
  3952.         int m;
  3953.         int d;
  3954.  
  3955.         month_day(1986,3,&m,&d);
  3956.  
  3957.         printf("%02d/%02d is 3 days into 1986.\n",m,d);
  3958.  
  3959.                   /* Will output: 01/03 is.... */
  3960.  
  3961.  
  3962.  
  3963.                                                             num_days
  3964.         Summary:
  3965.  
  3966.         int num_days(m,y);
  3967.         int m;                   /* Month to Get Number of Days For */
  3968.         int y;                   /* Year */
  3969.  
  3970.         Created: 12/27/85        Last Updated: 07/12/88
  3971.  
  3972.         Author: Bob Pritchett    Source in: CSRDATE.C
  3973.  
  3974.         Requires: isleap()
  3975.  
  3976.         Description:
  3977.  
  3978.         This function returns the number of days in the month  specified,
  3979.         leap years taken into account.
  3980.  
  3981.         Return Value:
  3982.  
  3983.         The number of days.
  3984.  
  3985.         See Also:
  3986.  
  3987.         date_sn() sn_date() isleap() chk_date()
  3988.  
  3989.         Example:
  3990.  
  3991.         printf("%d days in February, 1980.\n",num_days(2,1980));
  3992.  
  3993.  
  3994.  
  3995.                                                           num_drives
  3996.         Summary:
  3997.  
  3998.         int num_drives();
  3999.  
  4000.         Created: 04/06/86        Last Updated: 07/12/88
  4001.  
  4002.         Author: Bob Pritchett    Source in: NUMDRVS.ASM
  4003.  
  4004.         Requires: Nothing.
  4005.  
  4006.         Description:
  4007.  
  4008.         This  function  returns  a single integer value,  the  number  of
  4009.         logical drives available.   Remember that although this  function
  4010.         returns the number of available drives, access to these drives is
  4011.         numbered  from  zero,  so if 3 drives are reported,  the  highest
  4012.         number that may be accessed is 2.
  4013.  
  4014.         Return Value:
  4015.  
  4016.         The total number of logical drives installed.
  4017.  
  4018.         See Also:
  4019.  
  4020.         get_drive() set_drive()
  4021.  
  4022.         Example:
  4023.  
  4024.         printf("%d drives installed.  A: - %c:\n",num_drives(),
  4025.                ( 'A' + ( num_drives() - 1 ) ));
  4026.  
  4027.  
  4028.  
  4029.                                                                 play
  4030.         Summary:
  4031.  
  4032.         int play(mstr);
  4033.         char *mstr;              /* Music String to Play */
  4034.  
  4035.         Created: 02/20/86        Last Updated: 07/12/88
  4036.  
  4037.         Author: Paul Canniff     Source in: CSRPLAY.ASM
  4038.  
  4039.         Requires: sound()
  4040.  
  4041.         Description:
  4042.  
  4043.         This  function plays a music string using the  sound()  function,
  4044.         meaning that fore/background mode is determined by sound().
  4045.  
  4046.         The  format  for  the  string is the  same  as  that  of  BASICA.
  4047.         Summarized, the following options are available:  (Lengths are  1
  4048.         for whole note, 2 for half, 4 for quarter, etc.)
  4049.  
  4050.             A-G[x][.]   Play the note in the current octave.  The  length
  4051.                         can  be  set by x, or the default is  used.   The
  4052.                         note may be dotted.
  4053.             L<x>        Sets the default length.
  4054.             M<N|L|S>    Sets mode.  (Normal, Legato, Staccato.)
  4055.             N<x>        Plays note x.  (0..84)  Default values used.
  4056.             O<x>        Sets the octave, from 0 to 7.
  4057.             P[x][.]     Pauses for a specified time.
  4058.             T<x>        Sets the tempo, from 32 to 255.
  4059.             <           Go down one octave.
  4060.             >           Go up one octave.
  4061.  
  4062.         (Note:  The timing may need to be played with for your  hardware.
  4063.         Try adjusting the tempo.)
  4064.  
  4065.         Return Value:
  4066.  
  4067.         Nothing.
  4068.  
  4069.         See Also:
  4070.  
  4071.         sound() sound_init() sound_done()
  4072.  
  4073.         Example:
  4074.  
  4075.         play("MLc2.d ab>cd<ep2fgab");        /* Some Noise */
  4076.                 /* See CSRDEMO.C for a real example. */
  4077.  
  4078.  
  4079.  
  4080.                                                              pmclose
  4081.         Summary:
  4082.  
  4083.         void pmclose(mn);
  4084.         int mnu;                 /* Menu to Close */
  4085.  
  4086.         Created: 07/02/87        Last Updated: 07/12/88
  4087.  
  4088.         Author: Bob Pritchett    Source in: CSRMENU.C
  4089.  
  4090.         Requires: Nothing.
  4091.  
  4092.         Description:
  4093.  
  4094.         This  function  will  close the window associated  with  the  mnu
  4095.         pointer and free any memory allocated for it.
  4096.  
  4097.         See Also:
  4098.  
  4099.         pmopen() pmrun() pmenu() pop_menu()
  4100.  
  4101.         Example:
  4102.  
  4103.         char *stuff[3] =
  4104.          {
  4105.           "Option 1",
  4106.           "Second Option",
  4107.           "Your Third Choice"
  4108.          };
  4109.  
  4110.         main()
  4111.          {
  4112.           int m;
  4113.           int x;
  4114.           m = pmopen(10,10,"[ Menu ]",3,stuff,1);
  4115.           x = pmrun(m);
  4116.           pmclose(m);
  4117.           printf("\nMenu Choice %d Chosen.\n");
  4118.          }
  4119.  
  4120.  
  4121.  
  4122.                                                              pmcolor
  4123.         Summary:
  4124.  
  4125.         void pmcolor(nm,bd,br);
  4126.         int nm;                  /* Menu's Inside Color */
  4127.         int bd;                  /* Menu's Border Color */
  4128.         int br;                  /* Highlight Bar Color */
  4129.  
  4130.         Created: 07/05/87        Last Updated: 07/12/88
  4131.  
  4132.         Author: Bob Pritchett    Source in: CSRMENU.C
  4133.  
  4134.         Requires: Nothing.
  4135.  
  4136.         Description:
  4137.  
  4138.         This  function  sets the colors used for by menu's  created  with
  4139.         pmopen() and run with pmrun().
  4140.  
  4141.         See Also:
  4142.  
  4143.         pmopen() pmrun()
  4144.  
  4145.         Example:
  4146.  
  4147.         char *stuff[3] =
  4148.          {
  4149.           "Option 1",
  4150.           "Second Option",
  4151.           "Your Third Choice"
  4152.          };
  4153.  
  4154.         main()
  4155.          {
  4156.           int m;
  4157.           int x;
  4158.           pmcolor(RED_F,WHT_F,RED_F+WHT_B);
  4159.           m = pmopen(10,10,"[ Menu ]",3,stuff,1);
  4160.           x = pmrun(m);
  4161.           pmclose(m);
  4162.           printf("\nMenu Choice %d Chosen.\n");
  4163.          }
  4164.  
  4165.  
  4166.  
  4167.                                                                pmenu
  4168.         Summary:
  4169.  
  4170.         #include "csrmenu.h"     /* Contains MENU typedef */
  4171.  
  4172.         int pmenu(menu);
  4173.         MENU menu;               /* Pointer to Menu Structure */
  4174.  
  4175.         Created: 08/08/86        Last Updated: 07/12/88
  4176.  
  4177.         Author: Bob Pritchett    Source in: MENU.C
  4178.  
  4179.         Requires: Nothing.
  4180.  
  4181.         Description:
  4182.  
  4183.         This function will display a pop up menu and allow for  selection
  4184.         of an item with the arrow keys,  or the space and backspace keys.
  4185.         The  differences between pmenu() and pop_menu() are mostly in the
  4186.         calling method.   By using a data element of the MENU type as the
  4187.         only argument, the number of parameters specifiable is increased,
  4188.         allowing  for  better control of the menu,  while the  number  of
  4189.         function arguments is reduced to one for cleaner coding.
  4190.  
  4191.         If the first character in an item name is a hyphen, the item will
  4192.         be a horizontal line of the border color and type.  If the return
  4193.         value  of  an  element  is  a  negative  one,  the  item  is  non
  4194.         selectable.
  4195.  
  4196.         Note,  unlike  pop_menu(),  pmenu() will center the text of  each
  4197.         entry to the width of the largest entry.  If you place a space on
  4198.         each side of only the largest (widest) entry in a menu structure,
  4199.         all menu options will have at least one space on each side.
  4200.  
  4201.         For information on specification of menus,  read the  description
  4202.         of CSRMENU.H.
  4203.  
  4204.         Return Value:
  4205.  
  4206.         The value of the menu item selected or a -1 for failure.
  4207.  
  4208.         See Also:
  4209.  
  4210.         pop_menu()
  4211.  
  4212.  
  4213.  
  4214.                                                                pmenu
  4215.  
  4216.  
  4217.  
  4218.  
  4219.         Example:
  4220.  
  4221.         #include <csrmenu.h>
  4222.         #include "color.h"
  4223.  
  4224.         MENU mnu;
  4225.  
  4226.         main()
  4227.          {
  4228.           int x;
  4229.           strcpy(mnu->title,"Menu");
  4230.           mnu->type = 3;
  4231.           mnu->border = WHT_F+BLU_B;
  4232.           mnu->normal = RED_F+WHT_B;
  4233.           mnu->bar = WHT_F+RED_B;
  4234.           mnu->row = 6;
  4235.           mnu->col = 20;
  4236.           mnu->num = 4;
  4237.           strcpy(mnu->entry[0].text,"Help");
  4238.           mnu->entry[0].value = 1;
  4239.           strcpy(mnu->entry[1].text,"Exit");
  4240.           mnu->entry[1].value = 2;
  4241.           strcpy(mnu->entry[2].text,"-");
  4242.           mnu->entry[2].value = -1;
  4243.           strcpy(mnu->entry[3].text," Static ");
  4244.           mnu->entry[3].value = -1;
  4245.           x = pmenu(mnu);
  4246.           if ( x == -1 )
  4247.              exit(1);
  4248.           else if ( x == 1 )
  4249.              help();
  4250.           else
  4251.              exit(0);
  4252.           .
  4253.           .
  4254.           .
  4255.          }
  4256.  
  4257.  
  4258.  
  4259.                                                               pmfunc
  4260.         Summary:
  4261.  
  4262.         void pmfunc(func);
  4263.         int (*func)();           /* Function to be Called */
  4264.  
  4265.         Created: 07/03/87        Last Updated: 07/12/88
  4266.  
  4267.         Author: Bob Pritchett    Source in: CSRMENU.C
  4268.  
  4269.         Requires: Nothing.
  4270.  
  4271.         Description:
  4272.  
  4273.         This function will set the name of a function to be called  while
  4274.         pmrun()  is  waiting  for a keystroke.  This  function  must  run
  4275.         continuously  until  a  keystroke is  hit.   (It  should  contain
  4276.         something like a 'while ( ! kbhit() )' statement.)
  4277.  
  4278.         A  suggested  use  would be to update the time and  date  on  the
  4279.         screen.
  4280.  
  4281.         See Also:
  4282.  
  4283.         pmopen() pmrun()
  4284.  
  4285.  
  4286.  
  4287.                                                               pmfunc
  4288.  
  4289.  
  4290.  
  4291.  
  4292.         Example:
  4293.  
  4294.         int dtw;
  4295.  
  4296.         char *stuff[3] =
  4297.          {
  4298.           "Option 1",
  4299.           "Second Option",
  4300.           "Your Third Choice"
  4301.          };
  4302.  
  4303.         main()
  4304.          {
  4305.           int m;
  4306.           int x;
  4307.           int update();
  4308.           dtw = wopen(1,61,4,78,1);
  4309.           pmfunc(update);
  4310.           m = pmopen(10,10,"[ Menu ]",3,stuff,1);
  4311.           x = pmrun(m);
  4312.           pmclose(m);
  4313.           printf("\nMenu Choice %d Chosen.\n");
  4314.          }
  4315.  
  4316.         update()
  4317.          {
  4318.           int d,mn,y;
  4319.           int h,m,s,hs;
  4320.           while ( ! kbhit() )
  4321.            {
  4322.             get_date(&d,&mn,&y);
  4323.             get_time(&h,&m,&s,&hs);
  4324.             whome(dtw);
  4325.             wprintf(dtw," Date: %02d/%02d/%d\n",mn,d,(y-1900));
  4326.             wprintf(dtw," Time: %02d:%02d:%02d",h,m,s);
  4327.            }
  4328.          }
  4329.  
  4330.  
  4331.  
  4332.                                                               pmopen
  4333.         Summary:
  4334.  
  4335.         int pmopen(r,c,title,argc,argv,type);
  4336.         int r;                   /* Upper Left Corner Row */
  4337.         int c;                   /* Upper Left Corner Column */
  4338.         char *title;             /* Title of Menu */
  4339.         int argc;                /* Option Count */
  4340.         char *argv[];            /* Options */
  4341.         int type;                /* Border Type of Menu */
  4342.  
  4343.         Created: 07/02/87        Last Updated: 07/12/88
  4344.  
  4345.         Author: Bob Pritchett    Source in: CSRMENU.C
  4346.  
  4347.         Requires: Nothing.
  4348.  
  4349.         Description:
  4350.  
  4351.         This function opens a menu and sets up the internal data  without
  4352.         allowing  the  user to use the menu.  The  options  are  centered
  4353.         according  to the length of the longest one plus two.  (Left  and
  4354.         right justified menus can be created by left or right  justifying
  4355.         the options before calling pmopen().)
  4356.  
  4357.         Options  preceded by a '#' are static, meaning that they are  not
  4358.         selectable.  Those preceded by a '-' will be replaced with a line
  4359.         on the display.
  4360.  
  4361.         The integer value returned is a pointer to the menu for use  with
  4362.         pmrun()  or pmclose().  There are eight available  pointers,  and
  4363.         each menu can have as many as fifteen options.
  4364.  
  4365.         Return Value:
  4366.  
  4367.         The menu pointer.
  4368.  
  4369.         See Also:
  4370.  
  4371.         pmclose() pmrun() pmenu() pop_menu()
  4372.  
  4373.  
  4374.  
  4375.                                                               pmopen
  4376.  
  4377.  
  4378.  
  4379.  
  4380.         Example:
  4381.  
  4382.         int dtw;
  4383.  
  4384.         char *stuff[5] =
  4385.          {
  4386.           "Option 1",
  4387.           "-This is a line."
  4388.           "Second Option",
  4389.           "#Unselectable",
  4390.           "Your Third Choice"
  4391.          };
  4392.  
  4393.         main()
  4394.          {
  4395.           int m;
  4396.           int x;
  4397.           int update();
  4398.           dtw = wopen(1,61,4,78,1);
  4399.           pmfunc(update);
  4400.           m = pmopen(10,10,"[ Menu ]",5,stuff,1);
  4401.           x = pmrun(m);
  4402.           pmclose(m);
  4403.           printf("\nMenu Choice %d Chosen.\n");
  4404.          }
  4405.  
  4406.         update()
  4407.          {
  4408.           int d,mn,y;
  4409.           int h,m,s,hs;
  4410.           while ( ! kbhit() )
  4411.            {
  4412.             get_date(&d,&mn,&y);
  4413.             get_time(&h,&m,&s,&hs);
  4414.             whome(dtw);
  4415.             wprintf(dtw," Date: %02d/%02d/%d\n",mn,d,(y-1900));
  4416.             wprintf(dtw," Time: %02d:%02d:%02d",h,m,s);
  4417.            }
  4418.          }
  4419.  
  4420.  
  4421.  
  4422.                                                                pmrun
  4423.         Summary:
  4424.  
  4425.         int pmrun(mnu);
  4426.         int mnu;                 /* Menu to Run */
  4427.  
  4428.         Created: 07/03/87        Last Updated: 07/12/88
  4429.  
  4430.         Author: Bob Pritchett    Source in: CSRMENU.C
  4431.  
  4432.         Requires: Nothing.
  4433.  
  4434.         Description:
  4435.  
  4436.         This function will 'run' the specified menu, assuming that is has
  4437.         already been opened with the pmopen() function.
  4438.  
  4439.         If a function has been specified by the pmfunc() function it will
  4440.         be  run until a key is hit, at which time pmrun()  processes  it.
  4441.         Up and down arrows scroll the highlight bar through the menu,  as
  4442.         do space and backspace.  Hitting the enter key causes pmrun()  to
  4443.         return  the  number  of the  option  currently  highlighted,  and
  4444.         entering  the first letter of an option will cause it  to  return
  4445.         the  number of the FIRST option beginning with that letter.   The
  4446.         ESCape key causes pmrun() to return a -1.
  4447.  
  4448.         Note  that pmrun() always highlights the first menu  option,  and
  4449.         does not close the menu before returning the selected value.
  4450.  
  4451.         Return Value:
  4452.  
  4453.         The  number  of  the option selected, or -1 in the  case  of  the
  4454.         escape key.
  4455.  
  4456.         See Also:
  4457.  
  4458.         pmclose() pmopen() pmenu() pop_menu()
  4459.  
  4460.  
  4461.  
  4462.                                                                pmrun
  4463.  
  4464.  
  4465.  
  4466.  
  4467.         Example:
  4468.  
  4469.         char *stuff[5] =
  4470.          {
  4471.           "Option 1",
  4472.           "-This is a line."
  4473.           "Second Option",
  4474.           "#Unselectable",
  4475.           "Your Third Choice"
  4476.          };
  4477.  
  4478.         main()
  4479.          {
  4480.           int m;
  4481.           int x;
  4482.           m = pmopen(10,10,"[ Menu ]",5,stuff,1);
  4483.           while ( 1 )
  4484.            {
  4485.             x = pmrun(m);
  4486.             if ( x == -1 )
  4487.                break;
  4488.             switch(x)
  4489.              {
  4490.               case 0:
  4491.                 opt_one();
  4492.                 break;
  4493.               case 2:
  4494.                 opt_two();
  4495.                 break;
  4496.               case 4:
  4497.                 opt_three();
  4498.                 break;
  4499.               default:
  4500.                 break;
  4501.              }
  4502.            }
  4503.           pmclose(m);
  4504.           printf("\nMenu Choice %d Chosen.\n");
  4505.          }
  4506.  
  4507.  
  4508.  
  4509.                                                             pop_menu
  4510.         Summary:
  4511.  
  4512.         int pop_menu(x,y,num,args,title,type);
  4513.         int x;                   /* Row to Start on */
  4514.         int y;                   /* Col to Start on */
  4515.         int num;                 /* Number of Options */
  4516.         char *args[];            /* Function Names */
  4517.         char *title;             /* Menu Title */
  4518.         int type;                /* Window Type */
  4519.  
  4520.         Created: 03/09/86        Last Updated: 07/12/88
  4521.  
  4522.         Author: Bob Pritchett    Source in: POPMENU.C
  4523.  
  4524.         Requires: wopen() wclose() wtitle()
  4525.  
  4526.         Description:
  4527.  
  4528.         This  function  opens  a  window at x,y titled  with  the  string
  4529.         pointed to by title,  of type border style,  and with num options
  4530.         stored in args[].   The window's width is the size of the maximum
  4531.         length option.   The options are printed as sent to the  routine,
  4532.         but  for  a clean highligh bar,  and better performance  all  the
  4533.         options should be centered previously in a string.   See the demo
  4534.         programs for more examples of this.   Also note,  after an option
  4535.         is selected with the highlight bar,  the it's number is returned,
  4536.         and the window closed.  You must reopen the menu, this preferably
  4537.         done  in  a loop[ structure that opens the  menu,  processes  the
  4538.         resulting  code,  and  then reopens the menu.   This system is  a
  4539.         simple building block for more advanced menu design.
  4540.  
  4541.         Return Value:
  4542.  
  4543.         The number of the option selected with the highlight bar, or a -1
  4544.         signifying the user aborted the menu with the ESC key.
  4545.  
  4546.         See Also:
  4547.  
  4548.         mcolor()
  4549.  
  4550.  
  4551.  
  4552.                                                             pop_menu
  4553.  
  4554.  
  4555.  
  4556.  
  4557.         Example:
  4558.  
  4559.         #include "color.h"
  4560.  
  4561.         static char *array[] =
  4562.          {
  4563.           " Option 1 ",
  4564.           " Option 2 ",
  4565.           "   Quit   "
  4566.          };
  4567.  
  4568.         main()
  4569.          {
  4570.           int x;
  4571.           cls();
  4572.  
  4573.           while ( 1 )
  4574.            {
  4575.  
  4576.         /* Inside doesn't matter, mcolor() does that, so we use wcolor
  4577.            only to set our border.  Then mcolor() will set our menu
  4578.            colors.  (Color definition in loop in case other routines
  4579.            change them.) */
  4580.  
  4581.             wcolor(BLK_F,BLU_F+WHT_B);
  4582.             mcolor(YEL_F+RED_B,WHT_F+BLU_B);
  4583.  
  4584.             x = pop_menu(9,27,3,array," Menu ",3);
  4585.             if ( x == 0 )
  4586.                opt1();
  4587.             else if ( x == 1 )
  4588.                opt2();
  4589.             else if ( x == 2 || x == -1 )
  4590.                exit(0);
  4591.            }
  4592.          }
  4593.  
  4594.  
  4595.  
  4596.                                                         print_screen
  4597.         Summary:
  4598.  
  4599.         void print_screen();
  4600.  
  4601.         Created: 03/10/86        Last Updated: 07/12/88
  4602.  
  4603.         Author: Bob Pritchett    Source in: PRINT.C
  4604.  
  4605.         Requires: int86()
  4606.  
  4607.         Description:
  4608.  
  4609.         Performing the exact same feature as if you had hit the PrtSc key
  4610.         while holding the shift key down,  this routine prints the screen
  4611.         with the bios interrupt five.
  4612.  
  4613.         Example:
  4614.  
  4615.         print_screen();
  4616.  
  4617.  
  4618.  
  4619.                                                               prtrns
  4620.         Summary:
  4621.  
  4622.         int prtrns(c);
  4623.         int c;                   /* Character to translate */
  4624.  
  4625.         Created: 02/22/86        Last Updated: 07/12/88
  4626.  
  4627.         Author: Bob Pritchett    Source in: PRTRNS.C
  4628.  
  4629.         Requires: Nothing.
  4630.  
  4631.         Description:
  4632.  
  4633.         This function is a simple one that takes c as an argument, and if
  4634.         it is a special box drawing character form the extended character
  4635.         set  it is translated into an equivalent in the lower  127  ASCII
  4636.         range.   Possibly  useful  in writing a screen or text dump  that
  4637.         originally contained special characters.
  4638.  
  4639.         Return Value:
  4640.  
  4641.         Returns the character, translated if neccessary.
  4642.  
  4643.         Example:
  4644.  
  4645.         #include <stdio.h>
  4646.  
  4647.         int c = 179;
  4648.  
  4649.         c = prtrns(c);           /* Would return |, replacing 179. */
  4650.  
  4651.         putc(c,stdprn);
  4652.  
  4653.  
  4654.  
  4655.                                                                putat
  4656.         Summary:
  4657.  
  4658.         void putat(x,y,string);
  4659.         int x;                   /* Row to Put At */
  4660.         int y;                   /* Col to Put At */
  4661.         char *string;            /* String to Put */
  4662.  
  4663.         Created: 12/28/85        Last Updated: 07/12/88
  4664.  
  4665.         Author: Bob Pritchett    Source in: PUTAT.C
  4666.  
  4667.         Requires: ccputs() putchci()
  4668.  
  4669.         Description:
  4670.  
  4671.         This  function  places the specified string at x,y on the  global
  4672.         screen using the global color set by color().
  4673.  
  4674.         See Also:
  4675.  
  4676.         putatf() wputat() wputatf()
  4677.  
  4678.         Example:
  4679.  
  4680.         putat(10,25,"+ The plus is at 10,25.");
  4681.  
  4682.  
  4683.  
  4684.                                                               putatf
  4685.         Summary:
  4686.  
  4687.         void putatf(x,y,string,args...);
  4688.         int x;                   /* Row to Put At */
  4689.         int y;                   /* Col to Put At */
  4690.         char *string;            /* Formatted String to Put */
  4691.         args...                  /* Formatting Arguments */
  4692.  
  4693.         Created: 05/01/86        Last Updated: 07/12/88
  4694.  
  4695.         Author: Bob Pritchett    Source in: PUTATF.C
  4696.  
  4697.         Requires: ccputs() putchci()
  4698.  
  4699.         Description:
  4700.  
  4701.         This  performs the same function as putat() with the addition  of
  4702.         up to 15 formatting arguments in the same format as printf().
  4703.  
  4704.         See Also:
  4705.  
  4706.         putat() wputat() wputatf()
  4707.  
  4708.         Example:
  4709.  
  4710.         putatf(10,25,"+ The plus %s at %d,%d.","is",10,25);
  4711.  
  4712.  
  4713.  
  4714.                                                               putchc
  4715.         Summary:
  4716.  
  4717.         int putchc(c,color);
  4718.         int c;                   /* Character to Print */
  4719.         int color;               /* Attribute to Use */
  4720.  
  4721.         Created: 09/25/86        Last Updated: 07/12/88
  4722.  
  4723.         Author: Bob Pritchett    Source in: PUTCHC.ASM
  4724.  
  4725.         Requires: Nothing.
  4726.  
  4727.         Description:
  4728.  
  4729.         This function simply outputs the character and attribute without
  4730.         incrementing the cursor.
  4731.  
  4732.         Return Value:
  4733.  
  4734.         Nothing.
  4735.  
  4736.         See Also:
  4737.  
  4738.         putchci() wputchar()
  4739.  
  4740.         Example:
  4741.  
  4742.         #include "color.h"
  4743.  
  4744.         putchc('C',GRN_F+BLK_B);     /* Put out a C in green. */
  4745.  
  4746.  
  4747.  
  4748.                                                              putchci
  4749.         Summary:
  4750.  
  4751.         int putchci(c,color);
  4752.         int c;                   /* Character to Print */
  4753.         int color;               /* Attribute to Use */
  4754.  
  4755.         Created: 12/28/85        Last Updated: 07/12/88
  4756.  
  4757.         Author: Bob Pritchett    Source in: PUTCHCI.ASM
  4758.  
  4759.         Requires: Nothing.
  4760.  
  4761.         Description:
  4762.  
  4763.         This simply outputs the character c, using the color in color, to
  4764.         the video memory, and then increments the cursor.
  4765.  
  4766.         Return Value:
  4767.  
  4768.         Nothing.
  4769.  
  4770.         See Also:
  4771.  
  4772.         wputchar()
  4773.  
  4774.         Example:
  4775.  
  4776.         #include "color.h"
  4777.  
  4778.         putchci('A',RED_F+BLK_B);     /* Put out an A in red. */
  4779.  
  4780.  
  4781.  
  4782.                                                             read_tmr
  4783.         Summary:
  4784.  
  4785.         unsigned read_tmr(x);
  4786.         int x;                   /* The Number of the Counter to Use */
  4787.  
  4788.         Created: 01/03/87        Last Updated: 07/12/88
  4789.  
  4790.         Author: Dave Perras      Source in: TIMERS.C
  4791.  
  4792.         Requires: get_timer()
  4793.  
  4794.         Description:
  4795.  
  4796.         This function reads the specified timer and returns, in tenths of
  4797.         seconds, the difference between the stored time and the current.
  4798.  
  4799.         Return Value:
  4800.  
  4801.         An  unsigned value representing the tenths of seconds which  have
  4802.         elapsed since the start_tmr() function was called for this timer.
  4803.         If  the specified timer has not been initialized or has not  been
  4804.         started an error value of zero is returned.
  4805.  
  4806.         See Also:
  4807.  
  4808.         get_timer() start_tmr() stop_tmr() reset_tmr() zero_tmr() timer()
  4809.         init_tmr()
  4810.  
  4811.         Example:
  4812.  
  4813.         init_tmr();              /* Initialize Timers */
  4814.  
  4815.         start_tmr(5);            /* Start timer number 5. */
  4816.  
  4817.         printf("%d seconds have elapsed.\n",10 * read_tmr(5));
  4818.                   /* The above statement does not stop the timer. */
  4819.  
  4820.  
  4821.  
  4822.                                                            reset_tmr
  4823.         Summary:
  4824.  
  4825.         void reset_tmr(x);
  4826.         int x;                   /* The Number of the Counter to Use */
  4827.  
  4828.         Created: 01/03/87        Last Updated: 07/12/88
  4829.  
  4830.         Author: Dave Perras      Source in: TIMERS.C
  4831.  
  4832.         Requires: Nothing.
  4833.  
  4834.         Description:
  4835.  
  4836.         This  function  zeros the specified timer and clears  its  active
  4837.         flag.
  4838.  
  4839.         See Also:
  4840.  
  4841.         get_timer() start_tmr() stop_tmr() read_tmr() zero_tmr() timer()
  4842.         init_tmr()
  4843.  
  4844.         Example:
  4845.  
  4846.         init_tmr();              /* Initialize Timers */
  4847.  
  4848.         start_tmr(5);            /* Start timer number 5. */
  4849.  
  4850.         printf("%d seconds have elapsed.\n",10 * read_tmr(5));
  4851.                   /* The above statement does not stop the timer. */
  4852.  
  4853.         reset_tmr(5);            /* Stop and reset timer 5. */
  4854.  
  4855.  
  4856.  
  4857.                                                              restore
  4858.         Summary:
  4859.  
  4860.         void restore(x,y,x2,y2,array);
  4861.         int x;                   /* Upper Left Row */
  4862.         int y;                   /* Upper Left Col */
  4863.         int x2;                  /* Lower Right Row */
  4864.         int y2;                  /* Lower Right Col */
  4865.         char *array;             /* Array to Store Screen In */
  4866.  
  4867.         Created: 03/03/86        Last Updated: 07/12/88
  4868.  
  4869.         Author: Bob Pritchett    Source in: COUTPUT.C
  4870.  
  4871.         Requires: Nothing.
  4872.  
  4873.         Description:
  4874.  
  4875.         This function restores the portion of the screen previously saved
  4876.         by save() in array at the coordinates which are specified,  which
  4877.         don't have to be the same as those at which it was saved.
  4878.  
  4879.         See Also:
  4880.  
  4881.         save() restore_screen()
  4882.  
  4883.         Example:
  4884.  
  4885.         char *temp;
  4886.         temp = malloc(4000);     /* Size of screen and attributes. */
  4887.  
  4888.         save(0,0,24,79,temp);    /* Save whole screen. */
  4889.  
  4890.         restore(0,0,24,79,temp); /* Restore screen. */
  4891.  
  4892.  
  4893.  
  4894.                                                       restore_cursor
  4895.         Summary:
  4896.  
  4897.         void restore_cursor(x);
  4898.         int x;                   /* Cursor to Restore */
  4899.  
  4900.         Created: 02/22/86        Last Updated: 07/12/88
  4901.  
  4902.         Author: Bob Pritchett    Source in: CURSOR.C
  4903.  
  4904.         Requires: int86()
  4905.  
  4906.         Description:
  4907.  
  4908.         This function restores the cursor to the position give in the one
  4909.         byte argument, which contains both the row and column position as
  4910.         returned by save_cursor().
  4911.  
  4912.         A  cursor  position of 0 restores the cursor to  the  last  saved
  4913.         position,  not  the home position.  (This is in order  to  retain
  4914.         some compatibility with CSR v2.1.)
  4915.  
  4916.         See Also:
  4917.  
  4918.         save_cursor() restore_screen()
  4919.  
  4920.         Example:
  4921.  
  4922.         int x;
  4923.         int y;
  4924.  
  4925.         gotoxy(8,8);
  4926.         x = save_cursor();
  4927.         gotoxy(10,10);
  4928.         y = save_cursor();
  4929.  
  4930.         restore_cursor(x);      /* Return to 8,8 */
  4931.         restore_cursor(y);      /* Return to 10,10 */
  4932.  
  4933.  
  4934.  
  4935.                                                       restore_screen
  4936.         Summary:
  4937.  
  4938.         void restore_screen();
  4939.  
  4940.         Created: 03/09/86        Last Updated: 07/12/88
  4941.  
  4942.         Author: Bob Pritchett    Source in: SRSCREEN.C
  4943.  
  4944.         Requires: restore()
  4945.  
  4946.         Description:
  4947.  
  4948.         This  function  restores  the screen  saved  with  save_screen().
  4949.         Useful  for  restoring  the screen present  when  a  program  was
  4950.         invoked after it finishes executing.
  4951.  
  4952.         See Also:
  4953.  
  4954.         save_screen() restore_cursor()
  4955.  
  4956.         Example:
  4957.  
  4958.         main()
  4959.          {
  4960.           save_screen();
  4961.  
  4962.           /* Etc... */
  4963.  
  4964.           restore_screen();
  4965.           exit(0);
  4966.          }
  4967.  
  4968.  
  4969.  
  4970.                                                              retrace
  4971.         Summary:
  4972.  
  4973.         void retrace(x);
  4974.         int x;                   /* Type of Retrace to Test For */
  4975.  
  4976.         Created: 06/06/86        Last Updated: 07/12/88
  4977.  
  4978.         Author: Bob Pritchett    Source in: COUTPUT.C
  4979.  
  4980.         Requires: Nothing.
  4981.  
  4982.         Description:
  4983.  
  4984.         This  routine  determines which retrace to move data  into  video
  4985.         memory under.   The value can be 1,  (FAST) which represents data
  4986.         movement during the horizontal retrace, or 8, (SLOW) which causes
  4987.         data  to  be moved during the vertical  retrace.   The  fast/slow
  4988.         adjectives  have little to do with the data movement due  to  the
  4989.         number  of screen repaints per second.   The default is  vertical
  4990.         retrace,  8,  and  the main purpose of this function is to  allow
  4991.         an alternate method if desirable on some monitors.
  4992.  
  4993.         See Also:
  4994.  
  4995.         dma()
  4996.  
  4997.         Example:
  4998.  
  4999.         retrace(8);
  5000.                  /* Change to data movement during vertical retrace. */
  5001.  
  5002.  
  5003.  
  5004.                                                                 save
  5005.         Summary:
  5006.  
  5007.         void save(x,y,x2,y2,array);
  5008.         int x;                   /* Upper Left Row */
  5009.         int y;                   /* Upper Left Col */
  5010.         int x2;                  /* Lower Right Row */
  5011.         int y2;                  /* Lower Right Col */
  5012.         char *array;             /* Array to Store Screen In */
  5013.  
  5014.         Created: 03/03/86        Last Updated: 07/12/88
  5015.  
  5016.         Author: Bob Pritchett    Source in: COUTPUT.C
  5017.  
  5018.         Requires: Nothing.
  5019.  
  5020.         Description:
  5021.  
  5022.         This  function  saves the portion of the screen specified by  the
  5023.         four coordinates into array.   No other action is taken,  and the
  5024.         screen is not erased within that area.
  5025.  
  5026.         See Also:
  5027.  
  5028.         restore() save_screen()
  5029.  
  5030.         Example:
  5031.  
  5032.         char *temp;
  5033.         temp = malloc(4000);     /* Size of screen and attributes. */
  5034.  
  5035.         save(0,0,24,79,temp);    /* Save whole screen. */
  5036.  
  5037.         restore(0,0,24,79,temp); /* Restore screen. */
  5038.  
  5039.  
  5040.  
  5041.                                                          save_cursor
  5042.         Summary:
  5043.  
  5044.         int save_cursor();
  5045.  
  5046.         Created: 02/22/86        Last Updated: 07/12/88
  5047.  
  5048.         Author: Bob Pritchett    Source in: CURSOR.C
  5049.  
  5050.         Requires: int86()
  5051.  
  5052.         Description:
  5053.  
  5054.         This  function  saves the current cursor position and  returns  a
  5055.         single byte representation of that value.  This must be used with
  5056.         the  restore_cursor() function to put the cursor back.  The  most
  5057.         recently  save cursor position is also stored internally  and  is
  5058.         restored when restore_cursor() is called with 0 as an argument.
  5059.  
  5060.         Return Value:
  5061.  
  5062.         A single byte representation of the cursor position.
  5063.  
  5064.         See Also:
  5065.  
  5066.         restore_cursor()
  5067.  
  5068.         Example:
  5069.  
  5070.         int x;
  5071.  
  5072.         x = save_cursor();
  5073.  
  5074.         printf("This is a string of text...");
  5075.  
  5076.         restore_cursor(x);        /* To the beginning of the line... */
  5077.  
  5078.  
  5079.  
  5080.                                                          save_screen
  5081.         Summary:
  5082.  
  5083.         void save_screen();
  5084.  
  5085.         Created: 03/09/86        Last Updated: 07/12/88
  5086.  
  5087.         Author: Bob Pritchett    Source in: SRSCREEN.C
  5088.  
  5089.         Requires: save()
  5090.  
  5091.         Description:
  5092.  
  5093.         This  function saves the current screen and attributes for  later
  5094.         restoration with the restore_screen() function.
  5095.  
  5096.         See Also:
  5097.  
  5098.         save_cursor() restore_screen()
  5099.  
  5100.         Example:
  5101.  
  5102.         main()
  5103.          {
  5104.           save_screen();
  5105.  
  5106.           /* Etc... */
  5107.  
  5108.           restore_screen();
  5109.           exit(0);
  5110.          }
  5111.  
  5112.  
  5113.  
  5114.                                                               scroll
  5115.         Summary:
  5116.  
  5117.         void scroll(x,y,x2,y2,dir,num,color);
  5118.         int x;                   /* Upper Left Row */
  5119.         int y;                   /* Upper Left Col */
  5120.         int x2;                  /* Lower Right Row */
  5121.         int y2;                  /* Lower Right Col */
  5122.         int dir;                 /* 0 - Up / 1 - Down */
  5123.         int num;                 /* Number of Lines */
  5124.         int color;               /* Color To Clear To */
  5125.  
  5126.         Created: 03/03/86        Last Updated: 07/12/88
  5127.  
  5128.         Author: Bob Pritchett    Source in: SCROLL.C
  5129.  
  5130.         Requires: int86()
  5131.  
  5132.         Description:
  5133.  
  5134.         This function scrolls the area inside and including the specified
  5135.         coordinates  in  the  specified  window.   The  number  of  lines
  5136.         scrolled  is determined by the value of num and setting num to  0
  5137.         and  the  direction  0,  up,  will  cause  the  window  to  clear
  5138.         completly.
  5139.  
  5140.         See Also:
  5141.  
  5142.         wscroll()
  5143.  
  5144.         Example:
  5145.  
  5146.         #include "csr.h"            /* For Scroll Command #defines */
  5147.  
  5148.         scroll(0,0,24,80,SCROLL_UP,0,7); /* Clear the whole screen to */
  5149.                                          /* White-on-Black Attribute */
  5150.  
  5151.  
  5152.  
  5153.                                                              setbeep
  5154.         Summary:
  5155.  
  5156.         void setbeep(tone,length);
  5157.         int tone;                /* Tone for Beep */
  5158.         int length;              /* Length in Milliseconds */
  5159.  
  5160.         Created: 07/02/87        Last Updated: 07/12/88
  5161.  
  5162.         Author: Bob Pritchett    Source in: CSRBEEP.C
  5163.  
  5164.         Requires: Nothing.
  5165.  
  5166.         Description:
  5167.  
  5168.         This function sets the tone and duration of the beep produced  by
  5169.         beep().  The default values are 450 and 125.
  5170.  
  5171.         See Also:
  5172.  
  5173.         beep() setbeep()
  5174.  
  5175.         Example:
  5176.  
  5177.         setbeep(800,300);                     /* Long and High */
  5178.  
  5179.         beep();                               /* Output Beep */
  5180.  
  5181.  
  5182.  
  5183.                                                             set_date
  5184.         Summary:
  5185.  
  5186.         int set_date(dy,mn,yr);
  5187.         int dy;                  /* Day */
  5188.         int mn;                  /* Month */
  5189.         int yr;                  /* Year */
  5190.  
  5191.         Created: 03/31/86        Last Updated: 07/12/88
  5192.  
  5193.         Author: Bob Pritchett    Source in: SET_DATE.ASM
  5194.  
  5195.         Requires: intdos()
  5196.  
  5197.         Description:
  5198.  
  5199.         Using the DOS interrupts this routine sets the date as  specified
  5200.         in   the  three  parameters.    For  more  information  see   the
  5201.         description of get_date();
  5202.  
  5203.         Return Value:
  5204.  
  5205.         Nothing.
  5206.  
  5207.         See Also:
  5208.  
  5209.         get_dow() get_date() set_time()
  5210.  
  5211.         Example:
  5212.  
  5213.         int d = 4;
  5214.         int m = 7;
  5215.         int y = 1987;
  5216.  
  5217.         set_date(d,m,y);    /* Fourth of July, 1987. */
  5218.  
  5219.  
  5220.  
  5221.                                                            set_drive
  5222.         Summary:
  5223.  
  5224.         void set_drive(x);
  5225.         int x;                   /* Drive Numer to Set to */
  5226.  
  5227.         Created: 04/06/86        Last Updated: 07/12/88
  5228.  
  5229.         Author: Bob Pritchett    Source in: SETDRIVE.ASM
  5230.  
  5231.         Requires: Nothing.
  5232.  
  5233.         Description:
  5234.  
  5235.         This  function sets the current drive to the number specified  by
  5236.         x.  For an explanation of numbering conventions, see get_drive().
  5237.  
  5238.         See Also:
  5239.  
  5240.         get_drive() num_drives()
  5241.  
  5242.         Example:
  5243.  
  5244.         if ( num_drives() != 1 ) /* If we have more then 2 logical */
  5245.            set_drive(2);         /* Make the current the first HD, C: */
  5246.         else
  5247.            set_drive(0);         /* Else make it A: */
  5248.  
  5249.  
  5250.  
  5251.                                                             set_mode
  5252.         Summary:
  5253.  
  5254.         #include "csrmodes.h"    /* For Declarations Only */
  5255.  
  5256.         void set_mode(x);
  5257.         int x;                   /* Video Mode to Set to */
  5258.  
  5259.         Created: 05/03/86        Last Updated: 07/12/88
  5260.  
  5261.         Author: Bob Pritchett    Source in: SETMODE.ASM
  5262.  
  5263.         Requires: Nothing.
  5264.  
  5265.         Description:
  5266.  
  5267.         This function sets the video mode as specified in x.   Please see
  5268.         CSRMODES.H for a description of these modes.
  5269.  
  5270.         See Also:
  5271.  
  5272.         get_mode()
  5273.  
  5274.         Example:
  5275.  
  5276.         #include <csrmodes.h>
  5277.  
  5278.         set_mode(CO80);          /* 80 Columns - Color */
  5279.  
  5280.  
  5281.  
  5282.                                                             set_time
  5283.         Summary:
  5284.  
  5285.         void set_time(hr,mn,sc,hn);
  5286.         int hr;                  /* Hour */
  5287.         int mn;                  /* Minutes */
  5288.         int sc;                  /* Seconds */
  5289.         int hn;                  /* Hundredths */
  5290.  
  5291.         Created: 03/31/86        Last Updated: 07/12/88
  5292.  
  5293.         Author: Bob Pritchett    Source in: SET_TIME.C
  5294.  
  5295.         Requires: intdos()
  5296.  
  5297.         Description:
  5298.  
  5299.         This routine uses DOS to set the current time as specified.   For
  5300.         more information see the description of get_time().
  5301.  
  5302.         See Also:
  5303.  
  5304.         get_dow() set_date() get_time()
  5305.  
  5306.         Example:
  5307.  
  5308.         int h = 3;
  5309.         int m = 15;
  5310.         int s = 0;
  5311.         int hn = 0;
  5312.  
  5313.         set_time(h,m,s,hn);       /* Set the time to 3:15am. */
  5314.  
  5315.  
  5316.  
  5317.                                                              sn_date
  5318.         Summary:
  5319.  
  5320.         unsigned int sn_date(sn,m,d,y);
  5321.         unsigned int sn;         /* Serial Number to Convert to Date */
  5322.         int *m;                  /* Location to Store Month */
  5323.         int *d;                  /* Location to Store Day */
  5324.         int *y;                  /* Location to Store Year */
  5325.  
  5326.         Created: 09/01/86        Last Updated: 07/12/88
  5327.  
  5328.         Author: Bob Pritchett    Source in: CSRDATE.C
  5329.  
  5330.         Requires: isleap()
  5331.  
  5332.         Description:
  5333.  
  5334.         This  routine will turn serial numbers created by date_sn()  into
  5335.         dates.
  5336.  
  5337.         Return Value:
  5338.  
  5339.         Returns  a zero if the serial number is invalid,  else returns  a
  5340.         one.
  5341.  
  5342.         See Also:
  5343.  
  5344.         date_sn() valid_date() isleap() dt_diff()
  5345.  
  5346.         Example:
  5347.  
  5348.         int m;
  5349.         int d;
  5350.         int y;
  5351.         int sn;
  5352.  
  5353.         sn = date_sn(12,25,86);       /* Convert to serial number. */
  5354.  
  5355.         /* . . . Modify/Manipulate Serial Number . . . */
  5356.  
  5357.         sn_date(sn,&m,&d,&y);         /* Convert back to date. */
  5358.  
  5359.  
  5360.  
  5361.                                                               sndout
  5362.         Summary:
  5363.  
  5364.         void sndout(void);
  5365.  
  5366.         Created: 07/02/87        Last Updated: 07/12/88
  5367.  
  5368.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5369.  
  5370.         Requires: Nothing.
  5371.  
  5372.         Description:
  5373.  
  5374.         This  is  the  function  used internally  to  process  the  timer
  5375.         interrupt for background sound when it is trapped by sndsetint().
  5376.         It  increments a timer tick count and decides whether or  not  to
  5377.         start or stop a note as it is playing.
  5378.  
  5379.         There is no need to use it apart from its related routines.
  5380.  
  5381.         See Also:
  5382.  
  5383.         sound() sndsetint() sndrstint()
  5384.  
  5385.         Example:
  5386.  
  5387.         /**** Internal Use Only ****/
  5388.  
  5389.  
  5390.  
  5391.                                                            sndsetint
  5392.         Summary:
  5393.  
  5394.         void sndsetint(void);
  5395.  
  5396.         Created: 07/02/87        Last Updated: 07/12/88
  5397.  
  5398.         Author: Bob Pritchett    Source in: CSRSHND.ASM
  5399.  
  5400.         Requires: Nothing.
  5401.  
  5402.         Description:
  5403.  
  5404.         This function stores the current timer interrupt handler and sets
  5405.         it  to an internal routine that calls sndout() and then  the  old
  5406.         handler.   No initialization of the background sound routines  is
  5407.         done.
  5408.  
  5409.         See Also:
  5410.  
  5411.         sound() sndout() sndrstint()
  5412.  
  5413.         Example:
  5414.  
  5415.         /**** Internal Use Only ****/
  5416.  
  5417.  
  5418.  
  5419.                                                            sndrstint
  5420.         Summary:
  5421.  
  5422.         void sndrstint(void);
  5423.  
  5424.         Created: 07/02/87        Last Updated: 07/12/88
  5425.  
  5426.         Author: Bob Pritchett    Source in: CSRSHND.ASM
  5427.  
  5428.         Requires: Nothing.
  5429.  
  5430.         Description:
  5431.  
  5432.         This function removes from the chain of timer interrupt  handlers
  5433.         CSR's  background  sound  routines  and  replaces  the   previous
  5434.         handler.   This function MUST be called before a  program  exits.
  5435.         (The  sound_done()  function calls this function in  addition  to
  5436.         cleaning  up  internal  variables.   One of  these  two  must  be
  5437.         called.   It  is  recommended that  a  control-break  handler  is
  5438.         installed to either call this function or one that will.)
  5439.  
  5440.         See Also:
  5441.  
  5442.         sound() sndout() sndsetint() sound_done()
  5443.  
  5444.         Example:
  5445.  
  5446.         static int cbflag = 0;
  5447.  
  5448.         cbcapt(&cbflag);                /* Set Flag for Ctrl-Break */
  5449.  
  5450.         sound_init();                   /* Initialize Sound */
  5451.  
  5452.         while ( 1 )
  5453.          {
  5454.           /* Run Program Code - Break When Done */
  5455.           if ( cbflag )                 /* If Control-Break Occured */
  5456.            {
  5457.             sndrstint();                /* Restore Timer Handler */
  5458.             exit(1);                    /* Exit Program */
  5459.            }
  5460.          }
  5461.         sndrstint();                    /* Restore After Execution */
  5462.         exit(0);                        /* Program Exits Normally */
  5463.  
  5464.  
  5465.  
  5466.                                                                sound
  5467.         Summary:
  5468.  
  5469.         #include "csrsound.h"
  5470.  
  5471.         void sound(tone,duration);
  5472.         long tone;               /* Frequency in MegaHertz x 100 */
  5473.         long duration;           /* Length in Milliseconds */
  5474.  
  5475.         Created: 05/12/86        Last Updated: 07/12/88
  5476.  
  5477.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5478.  
  5479.         Requires: Nothing.
  5480.  
  5481.         Description:
  5482.  
  5483.         This  function  will put the specified note into the  buffer  and
  5484.         return,  when  in background mode, or play the note  and  return.
  5485.         (See the 'Sound' description of related routines in the beginning
  5486.         of  this documentation.)  If sound is in background mode and  the
  5487.         buffer  is full it will wait until there is room  before  placing
  5488.         the note in the buffer.
  5489.  
  5490.         The tone variable must hold the frequency to be output multiplied
  5491.         by  100.   (Previous  versions of sound worked  with  the  actual
  5492.         frequency.)    The  duration  is  the  length  of  the  note   in
  5493.         milliseconds, and should be reasonably accurate on all processors
  5494.         and in both modes.
  5495.  
  5496.         See Also:
  5497.  
  5498.         sound_init() play() beep() setbeep()
  5499.  
  5500.         Example:
  5501.  
  5502.         #include <csrsound.h>
  5503.  
  5504.         sound(C,5000L);
  5505.         sound(D,2500L);
  5506.         sound(E,1250L);
  5507.  
  5508.  
  5509.  
  5510.                                                           sound_done
  5511.         Summary:
  5512.  
  5513.         void sound_done(void);
  5514.  
  5515.         Created: 07/02/87        Last Updated: 07/12/88
  5516.  
  5517.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5518.  
  5519.         Requires: sndrstint() spkr_off()
  5520.  
  5521.         Description:
  5522.  
  5523.         This  function calls sndrstint() to restore the  timer  interrupt
  5524.         (which  MUST  be done before any program using  background  sound
  5525.         exits) and turns off the speaker in case it was left on.
  5526.  
  5527.         See Also:
  5528.  
  5529.         sound() sound_init() sndsetint() sndrstint() play()
  5530.  
  5531.         Example:
  5532.  
  5533.         sound_init();
  5534.         /* Play something.... */
  5535.         sound_done();
  5536.  
  5537.  
  5538.  
  5539.                                                           sound_init
  5540.         Summary:
  5541.  
  5542.         void sound_init(void);
  5543.  
  5544.         Created: 07/02/87        Last Updated: 07/12/88
  5545.  
  5546.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5547.  
  5548.         Requires: sndsetint()
  5549.  
  5550.         Description:
  5551.  
  5552.         This  function calls sndsetint() to trap the timer interrupt  and
  5553.         sets up the sound routine to play notes in the background.   When
  5554.         this  function  is called all subsequent calls  to  sound()  will
  5555.         cause the notes to be played in background.
  5556.  
  5557.         NOTE:  This function has been disabled in Version 3.0 of  C  Spot
  5558.         Run.  Foreground sound is the only type currently supported.
  5559.  
  5560.         See Also:
  5561.  
  5562.         sound() sound_done() sndsetint() sndrstint() play()
  5563.  
  5564.         Example:
  5565.  
  5566.         sound_init();
  5567.         /* Play something.... */
  5568.         sound_done();
  5569.  
  5570.  
  5571.  
  5572.                                                           sound_left
  5573.         Summary:
  5574.  
  5575.         int sound_left(void);
  5576.  
  5577.         Created: 07/02/87        Last Updated: 07/12/88
  5578.  
  5579.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5580.  
  5581.         Requires: Nothing.
  5582.  
  5583.         Description:
  5584.  
  5585.         This  function  returns  the number of  notes  remaining  in  the
  5586.         background sound buffer.
  5587.  
  5588.         Return Value:
  5589.  
  5590.         The number of notes in the background sound buffer.
  5591.  
  5592.         See Also:
  5593.  
  5594.         sound() sound_init() sound_quiet() play() sound_done()
  5595.  
  5596.         Example:
  5597.  
  5598.         sound_init();
  5599.         /* Play something.... */
  5600.         wait_hs(500);                   /* Wait 5 Seconds */
  5601.         if ( sound_left() )             /* If Sound Remains */
  5602.            sound_quiet();               /*   Kill It */
  5603.         /* Go on with program.... */
  5604.         sound_done();
  5605.  
  5606.  
  5607.  
  5608.                                                          sound_quiet
  5609.         Summary:
  5610.  
  5611.         void sound_quiet(void);
  5612.  
  5613.         Created: 07/02/87        Last Updated: 07/12/88
  5614.  
  5615.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5616.  
  5617.         Requires: spkr_off()
  5618.  
  5619.         Description:
  5620.  
  5621.         This  function aborts all of the sound in the buffer, resets  the
  5622.         internal values, and turns off the speaker, but leaves the  sound
  5623.         in background mode.
  5624.  
  5625.         See Also:
  5626.  
  5627.         sound() sound_init() sound_left() play() sound_done()
  5628.  
  5629.         Example:
  5630.  
  5631.         sound_init();
  5632.         /* Play something.... */
  5633.         wait_hs(500);                   /* Wait 5 Seconds */
  5634.         sound_quiet();                  /* Kill Whatever is Left */
  5635.         /* Go on with program.... */
  5636.         sound_done();
  5637.  
  5638.  
  5639.  
  5640.                                                              soundex
  5641.         Summary:
  5642.  
  5643.         int soundex(name,code);
  5644.         char *name;              /* Name to Process */
  5645.         char *code;              /* String to Hold Code */
  5646.  
  5647.         Created: 00/00/00        Last Updated: 07/12/88
  5648.  
  5649.         Author: David Lovelock   Source in: SOUNDEX.C
  5650.  
  5651.         Requires: Nothing.
  5652.  
  5653.         Description:
  5654.  
  5655.         This  routine will, for any given name of up to 40 characters  in
  5656.         length,  return  a code value representing it.  This  code  value
  5657.         will be the same as values for similar sounding names.  The  code
  5658.         consists  of  the  first letter of the name,  followed  by  three
  5659.         digits and a NULL.
  5660.  
  5661.         Return Value:
  5662.  
  5663.         If  the  string is to long or there is an error -1  is  returned,
  5664.         otherwise 0 is returned.
  5665.  
  5666.         Example:
  5667.  
  5668.         /* All should return an identical code. */
  5669.  
  5670.         char code[5];
  5671.  
  5672.         soundex("MacHew",code);
  5673.         printf("MacHew: %s.\n",code);
  5674.  
  5675.         soundex("MacKew",code);
  5676.         printf("MacKew: %s.\n",code);
  5677.  
  5678.         soundex("McQue",code);
  5679.         printf("McQue: %s.\n",code);
  5680.  
  5681.  
  5682.  
  5683.                                                            spkr_freq
  5684.         Summary:
  5685.  
  5686.         void spkr_freq(tone);
  5687.         long tone;               /* Frequency x 100 to Set Speaker To */
  5688.  
  5689.         Created: 07/02/87        Last Updated: 07/12/88
  5690.  
  5691.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5692.  
  5693.         Requires: Nothing.
  5694.  
  5695.         Description:
  5696.  
  5697.         This  function sets up the speaker for a frequency but  does  not
  5698.         play the frequency.  The spkr_on() function initiates the  actual
  5699.         sound.
  5700.  
  5701.         See Also:
  5702.  
  5703.         sound() sound_init() sndout() spkr_on() spkr_off()
  5704.  
  5705.         Example:
  5706.  
  5707.         /***** Used Internally by sndout() *****/
  5708.  
  5709.  
  5710.  
  5711.                                                             spkr_off
  5712.         Summary:
  5713.  
  5714.         void spkr_off(void);
  5715.  
  5716.         Created: 07/02/87        Last Updated: 07/12/88
  5717.  
  5718.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5719.  
  5720.         Requires: Nothing.
  5721.  
  5722.         Description:
  5723.  
  5724.         This  function  simply turns off the speaker, cutting  short  any
  5725.         sound currently being made.
  5726.  
  5727.         See Also:
  5728.  
  5729.         sound() sound_init() sndout() spkr_on() spkr_freq()
  5730.  
  5731.         Example:
  5732.  
  5733.         /***** Used Internally by sndout() *****/
  5734.  
  5735.  
  5736.  
  5737.                                                              spkr_on
  5738.         Summary:
  5739.  
  5740.         void spkr_on(void);
  5741.  
  5742.         Created: 07/02/87        Last Updated: 07/12/88
  5743.  
  5744.         Author: Bob Pritchett    Source in: CSRSOUND.C
  5745.  
  5746.         Requires: Nothing.
  5747.  
  5748.         Description:
  5749.  
  5750.         This  function turns on the speaker, causing it to play  whatever
  5751.         frequency  it  has loaded.  (See spkr_freq().)   The  sound  will
  5752.         continue until spkr_off() is called.
  5753.  
  5754.         See Also:
  5755.  
  5756.         sound() sound_init() sndout() spkr_off() spkr_freq()
  5757.  
  5758.         Example:
  5759.  
  5760.         /***** Used Internally by sndout() *****/
  5761.  
  5762.  
  5763.  
  5764.                                                            start_tmr
  5765.         Summary:
  5766.  
  5767.         void start_tmr(x);
  5768.         int x;                   /* The Number of the Counter to Use */
  5769.  
  5770.         Created: 01/03/87        Last Updated: 07/12/88
  5771.  
  5772.         Author: Dave Perras      Source in: TIMERS.C TIMERS.C
  5773.  
  5774.         Requires: get_timer()
  5775.  
  5776.         Description:
  5777.  
  5778.         This  function  will begin tracking the elapsed  time  using  the
  5779.         timer  number  given.   This is done by reading and  storing  the
  5780.         value of the real time clock.
  5781.  
  5782.         See Also:
  5783.  
  5784.         get_timer() stop_tmr() read_tmr() reset_tmr() zero_tmr() timer()
  5785.         init_tmr()
  5786.  
  5787.         Example:
  5788.  
  5789.         init_tmr();              /* Initialize Timers */
  5790.  
  5791.         start_tmr(2);            /* Start timer number 2. */
  5792.  
  5793.  
  5794.  
  5795.                                                             stop_tmr
  5796.         Summary:
  5797.  
  5798.         unsigned stop_tmr(x);
  5799.         int x;                   /* The Number of the Counter to Use */
  5800.  
  5801.         Created: 01/03/87        Last Updated: 07/12/88
  5802.  
  5803.         Author: Dave Perras      Source in: TIMERS.C TIMERS.C
  5804.  
  5805.         Requires: get_timer()
  5806.  
  5807.         Description:
  5808.  
  5809.         This  function  will first read the current setting of  the  real
  5810.         time clock, determine the difference in tenths of seconds between
  5811.         the  stored and current time,  and then zero the specified  timer
  5812.         and reset its active flag.
  5813.  
  5814.         Return Value:
  5815.  
  5816.         An  unsigned value representing the tenths of seconds which  have
  5817.         elapsed since the start_tmr() function was called for this timer.
  5818.         The  maximum  interval  over  which  the  timer  is  accurate  is
  5819.         determined  by  the  size of an  unsigned  int,  which  for  most
  5820.         compilers results in an approximate limit of 1.8 hours.
  5821.  
  5822.         See Also:
  5823.  
  5824.         get_timer() start_tmr() read_tmr() reset_tmr() zero_tmr() timer()
  5825.         init_tmr()
  5826.  
  5827.         Example:
  5828.  
  5829.         init_tmr();              /* Initialize Timers */
  5830.  
  5831.         start_tmr(5);            /* Start timer number 5. */
  5832.  
  5833.         printf("%d seconds have elapsed.\n",10 * stop_tmr(5));
  5834.  
  5835.  
  5836.  
  5837.                                                               strcen
  5838.         Summary:
  5839.  
  5840.         char *strcen(string,result,width);
  5841.         char *string;            /* String to Center */
  5842.         char *result;            /* Where to Put It */
  5843.         int width;               /* Width to Center on */
  5844.  
  5845.         Created: 03/03/86        Last Updated: 07/12/88
  5846.  
  5847.         Author: Bob Pritchett    Source in: STRCEN.C
  5848.  
  5849.         Requires: strtrm()
  5850.  
  5851.         Description:
  5852.  
  5853.         This  routine  places  string into result  with  the  appropriate
  5854.         amount  of preceding and trailing spaces.   The length of  result
  5855.         will  be width.   Note that the string is trimmed (See strtrm().)
  5856.         before  it is centered,  and that an uneven number of  spaces  on
  5857.         each side results in the extra space being tagged to the end.
  5858.  
  5859.         Return Value:
  5860.  
  5861.         A pointer to the centered string is returned.
  5862.  
  5863.         See Also:
  5864.  
  5865.         strtrm() strlft() strght() center()
  5866.  
  5867.         Example:
  5868.  
  5869.         char temp[25];
  5870.  
  5871.         strcen("  Centered   ",temp,20);
  5872.         printf("Centered String:\n 12345678901234567890\n>%s<\n",temp);
  5873.  
  5874.         /*  Results in  >      Centered      <  */
  5875.  
  5876.  
  5877.  
  5878.                                                               strght
  5879.         Summary:
  5880.  
  5881.         char *strght(string,result,width);
  5882.         char *string;            /* String to Right Justify */
  5883.         char *result;            /* Where to Put It */
  5884.         int width;               /* Width to Justify in */
  5885.  
  5886.         Created: 09/07/86        Last Updated: 07/12/88
  5887.  
  5888.         Author: Bob Pritchett    Source in: STRGHT.C
  5889.  
  5890.         Requires: strtrm()
  5891.  
  5892.         Description:
  5893.  
  5894.         This  routine  will right justify the given string,  placing  the
  5895.         result  in the specified variable.   The string will  be  trimmed
  5896.         with strtrm() before the justification.
  5897.  
  5898.         Return Value:
  5899.  
  5900.         A pointer to the justified string will be returned.
  5901.  
  5902.         See Also:
  5903.  
  5904.         strcen() strlft() strtrm()
  5905.  
  5906.         Example:
  5907.  
  5908.         char temp[25];
  5909.  
  5910.         strght("  Right Just.   ",temp,20);
  5911.         printf("Justified String:\n 12345678901234567890\n>%s<\n",temp);
  5912.  
  5913.         /*  Results in  >         Right Just.<  */
  5914.  
  5915.  
  5916.  
  5917.                                                               strlft
  5918.         Summary:
  5919.  
  5920.         char *strlft(string,result,width);
  5921.         char *string;            /* String to Left Justify */
  5922.         char *result;            /* Where to Put It */
  5923.         int width;               /* Width to Justify in */
  5924.  
  5925.         Created: 09/07/86        Last Updated: 07/12/88
  5926.  
  5927.         Author: Bob Pritchett    Source in: STRLFT.C
  5928.  
  5929.         Requires: strtrm()
  5930.  
  5931.         Description:
  5932.  
  5933.         This  routine  will left justify the given  string,  placing  the
  5934.         result  in  the specified variable.   The string will be  trimmed
  5935.         with strtrm() before the justification.
  5936.  
  5937.         Return Value:
  5938.  
  5939.         A pointer to the justified string will be returned.
  5940.  
  5941.         See Also:
  5942.  
  5943.         strcen() strght() strtrm()
  5944.  
  5945.         Example:
  5946.  
  5947.         char temp[25];
  5948.  
  5949.         strght("  Left Just.   ",temp,20);
  5950.         printf("Justified String:\n 12345678901234567890\n>%s<\n",temp);
  5951.  
  5952.         /*  Results in  >Left Just.          <  */
  5953.  
  5954.  
  5955.  
  5956.                                                               strtrm
  5957.         Summary:
  5958.  
  5959.         int strtrm(string,result);
  5960.         char *string;            /* String to Trim */
  5961.         char *result;            /* Where to Put It */
  5962.  
  5963.         Created: 09/07/86        Last Updated: 07/12/88
  5964.  
  5965.         Author: Bob Pritchett    Source in: STRTRM.C
  5966.  
  5967.         Requires: Nothing.
  5968.  
  5969.         Description:
  5970.  
  5971.         This  routine  trims  all preceding and trailing  spaces  from  a
  5972.         string, while preserving spaces inside the string.
  5973.  
  5974.         Return Value:
  5975.  
  5976.         The length of the new string.
  5977.  
  5978.         See Also:
  5979.  
  5980.         strcen() strght() strlft()
  5981.  
  5982.         Example:
  5983.  
  5984.         char temp[25];
  5985.  
  5986.         strtrm("  Trim This.   ",temp);
  5987.         printf("Trimmed String:\n>%s<\n",temp);
  5988.  
  5989.         /*  Results in  >Trim This.<  */
  5990.  
  5991.  
  5992.  
  5993.                                                                timer
  5994.         Summary:
  5995.  
  5996.         int timer();
  5997.  
  5998.         Created: 04/14/86        Last Updated: 07/12/88
  5999.  
  6000.         Author: Unknown          Source in: TIMER.C
  6001.  
  6002.         Requires: int86()
  6003.  
  6004.         Description:
  6005.  
  6006.         This  routine  will return an integer representing the number  of
  6007.         clock ticks since the last call.   Remember that there are  about
  6008.         18.2 ticks per second.
  6009.  
  6010.         Return Value:
  6011.  
  6012.         The number of ticks since last call.
  6013.  
  6014.         Example:
  6015.  
  6016.         timer();            /* Start count... */
  6017.         routine();
  6018.         printf("routine() took %d ticks to execute.\n",timer());
  6019.  
  6020.  
  6021.  
  6022.                                                           valid_date
  6023.         Summary:
  6024.  
  6025.         unsigned int valid_date(m,d,y);
  6026.         int m;                   /* Month to Check */
  6027.         int d;                   /* Day to Check */
  6028.         int y;                   /* Year to Check */
  6029.  
  6030.         Created: 09/01/86        Last Updated: 07/12/88
  6031.  
  6032.         Author: George Roukas    Source in: CSRDATE.C
  6033.  
  6034.         Requires: isleap()
  6035.  
  6036.         Description:
  6037.  
  6038.         This function performs in a manner similar to that of  chk_date()
  6039.         with the exception that it verifies that the year is between 1900
  6040.         and 2050, in order to be compatible with date_sn() and sn_date().
  6041.  
  6042.         Return Value:
  6043.  
  6044.         Evaluates as true if the date is valid, false if it is not.
  6045.  
  6046.         See Also:
  6047.  
  6048.         chk_date() date_sn() sn_date() isleap()
  6049.  
  6050.         Example:
  6051.  
  6052.         if ( valid_date(6,15,1791) )       /* Evaluates as False */
  6053.            function();
  6054.  
  6055.         if ( valid_date(6,15,1971) )       /* Evaluates as True */
  6056.            otherwise();
  6057.  
  6058.  
  6059.  
  6060.                                                               vidblt
  6061.         Summary:
  6062.  
  6063.         int vidblt(ss,so,ds,do,x);
  6064.         int ss;                  /* Segment Address of Source */
  6065.         int so;                  /* Segment Offset of Source */
  6066.         int ds;                  /* Segment Address of Destination */
  6067.         int do;                  /* Segment Offset of Destination */
  6068.         int x;                   /* Number of Bytes to Move */
  6069.  
  6070.         Created: 00/00/85        Last Updated: 07/12/88
  6071.  
  6072.         Author: Philip A. Mongelluzzo Source in: SNOWLESS.ASM
  6073.  
  6074.         Requires: Uses _csrbit in COUTPUT.C to determine retrace mode.
  6075.  
  6076.         Description:
  6077.  
  6078.         This  routine is similar to Microsoft's movedata() except that it
  6079.         is  used for moving data (with the same parameters) to  and  from
  6080.         the color monitor memory without causing snow or flicker.
  6081.  
  6082.         Return Value:
  6083.  
  6084.         No return value.
  6085.  
  6086.         Example:
  6087.  
  6088.         /* Contact Bob Pritchett if you need to use it independantly. */
  6089.  
  6090.  
  6091.  
  6092.                                                            wactivate
  6093.         Summary:
  6094.  
  6095.         int wactivate(wind);
  6096.         int wind;                /* Pointer to Window to Activate */
  6097.  
  6098.         Created: 03/03/86        Last Updated: 07/12/88
  6099.  
  6100.         Author: Bob Pritchett    Source in: COUTPUT.C
  6101.  
  6102.         Requires: Nothing.
  6103.  
  6104.         Description:
  6105.  
  6106.         This  function activates the specified window.   If the window is
  6107.         overlayed  by  other windows it is brought out  from  behind  and
  6108.         becomes the active window, on top of the other and uncovered.
  6109.  
  6110.         Return Value:
  6111.  
  6112.         0 if successful, -1 if an invalid window pointer is specified.
  6113.  
  6114.         See Also:
  6115.  
  6116.         wclose() wopen()
  6117.  
  6118.         Example:
  6119.  
  6120.         wactivate(w3);                /* Activate an opened window */
  6121.  
  6122.  
  6123.  
  6124.                                                              wait_hs
  6125.         Summary:
  6126.  
  6127.         int wait_hs(time);
  6128.         int time;                /* Hundredths of Seconds to Wait */
  6129.  
  6130.         Created: 06/18/87        Last Updated: 07/12/88
  6131.  
  6132.         Author: Bob Pritchett    Source in: WAIT_HS.C
  6133.  
  6134.         Requires: get_time()
  6135.  
  6136.         Description:
  6137.  
  6138.         This  function simply sits and waits for as many hundredths of  a
  6139.         second as specified.  It is accurate to within the time it  takes
  6140.         get_time() to run.  (If a key is hit during the delay, the  delay
  6141.         is aborted and the keystroke returned.)
  6142.  
  6143.         Return Value:
  6144.  
  6145.         Any key hit during the delay, or -1 if full delay endured.
  6146.  
  6147.         Example:
  6148.  
  6149.         if ( ( c = wait_hs(200) ) == -1 )        /* Wait 2 Seconds */
  6150.          {
  6151.           printf("Please Enter a Key!\n");
  6152.           c = getch();
  6153.          }
  6154.  
  6155.  
  6156.  
  6157.                                                               wblank
  6158.         Summary:
  6159.  
  6160.         void wblank(wind,row);
  6161.         int wind;                /* Pointer to Window to Use */
  6162.         int row;                 /* Row to Clear */
  6163.  
  6164.         Created: 04/30/86        Last Updated: 07/12/88
  6165.  
  6166.         Author: Bob Pritchett    Source in: COUTPUT.C
  6167.  
  6168.         Requires: Nothing.
  6169.  
  6170.         Description:
  6171.  
  6172.         This  function will erase the specified row within the  specified
  6173.         window by deleting then inserting that row.   The cursor is place
  6174.         at column 0 in this row.
  6175.  
  6176.         See Also:
  6177.  
  6178.         winsert() wdelete()
  6179.  
  6180.         Example:
  6181.  
  6182.         wblank(win,3);
  6183.  
  6184.  
  6185.  
  6186.                                                              wborder
  6187.         Summary:
  6188.  
  6189.         int wborder(num,type);
  6190.         int num;                 /* Number of Window to Use */
  6191.         int type;                /* Type of Window Border to Use */
  6192.  
  6193.         Created: 04/25/86        Last Updated: 07/12/88
  6194.  
  6195.         Author: Bob Pritchett    Source in: COUTPUT.C
  6196.  
  6197.         Requires: Nothing.
  6198.  
  6199.         Description:
  6200.  
  6201.         This function redraws the border of a window, using whatever type
  6202.         is  specified,  and the colors stored for this window.   The most
  6203.         useful  purpose is to 'erase' wtitle() and  wmessage()  messages,
  6204.         and to change the style of the border.
  6205.  
  6206.         Return Value:
  6207.  
  6208.         0 if successful, -1 if an invalid window is specified.
  6209.  
  6210.         See Also:
  6211.  
  6212.         wcolor()
  6213.  
  6214.         Example:
  6215.  
  6216.         wborder(win,4);
  6217.  
  6218.  
  6219.  
  6220.                                                              wcenter
  6221.         Summary:
  6222.  
  6223.         void wcenter(win,x,str);
  6224.         int win;                 /* Window to Use */
  6225.         int x;                   /* Line to Center on */
  6226.         char *str;               /* String to Center */
  6227.  
  6228.         Created: 03/03/86        Last Updated: 07/12/88
  6229.  
  6230.         Author: Bob Pritchett    Source in: WCENTER.C
  6231.  
  6232.         Requires: wgotoxy() wprint()
  6233.  
  6234.         Description:
  6235.  
  6236.         This  routine is functionally the same as center() except that  x
  6237.         is a line within the specified window, and the string is centered
  6238.         in window coordinates,  not global.  The window's inside color is
  6239.         used.
  6240.  
  6241.         See Also:
  6242.  
  6243.         wcenterf() center()
  6244.  
  6245.         Example:
  6246.  
  6247.         wcenter(w3,5,"This is centered in window 3.");
  6248.  
  6249.  
  6250.  
  6251.                                                             wcenterf
  6252.         Summary:
  6253.  
  6254.         void wcenterf(win,x,str[,arguments...]);
  6255.         int win;                 /* Window to Use */
  6256.         int x;                   /* Line to Center on */
  6257.         char *str;               /* String to Center */
  6258.  
  6259.         Created: 04/13/86        Last Updated: 07/12/88
  6260.  
  6261.         Author: Bob Pritchett    Source in: WCENTERF.C
  6262.  
  6263.         Requires: wgotoxy() wprint()
  6264.  
  6265.         Description:
  6266.  
  6267.         Just like centerf() only in the specified window.
  6268.  
  6269.         See Also:
  6270.  
  6271.         center() centerf() wcenter()
  6272.  
  6273.         Example:
  6274.  
  6275.         wcenterf(w3,5,"This is %s in window 3.","centered");
  6276.  
  6277.  
  6278.  
  6279.                                                               wclose
  6280.         Summary:
  6281.  
  6282.         int wclose(wind);
  6283.         int wind;                /* Pointer to Window to Close */
  6284.  
  6285.         Created: 03/03/86        Last Updated: 07/12/88
  6286.  
  6287.         Author: Bob Pritchett    Source in: COUTPUT.C
  6288.  
  6289.         Requires: Nothing.
  6290.  
  6291.         Description:
  6292.  
  6293.         This  function  closes  a  video window  previously  opened  with
  6294.         wopen().   The  portion of the screen that was covered with   the
  6295.         window is restored.  NOTE:  You may close a window other then the
  6296.         active one, it will be acitivated and properly closed.
  6297.  
  6298.         Return Value:
  6299.  
  6300.         0 if successful, -1 if an invalid window is specified.
  6301.  
  6302.         See Also:
  6303.  
  6304.         wcloseall() wopen() wactivate()
  6305.  
  6306.         Example:
  6307.  
  6308.         int w;
  6309.  
  6310.         w = wopen(10,10,20,70,2);     /* Open a large window */
  6311.  
  6312.         wclose(w);                    /* Restore covered screen area */
  6313.  
  6314.  
  6315.  
  6316.                                                            wcloseall
  6317.         Summary:
  6318.  
  6319.         void wcloseall();
  6320.  
  6321.         Created: 03/03/86        Last Updated: 07/12/88
  6322.  
  6323.         Author: Bob Pritchett    Source in: COUTPUT.C
  6324.  
  6325.         Requires: Nothing.
  6326.  
  6327.         Description:
  6328.  
  6329.         This  function closes all the open windows by repeatedly  calling
  6330.         wclose().   The active window is closed first,  and so on all the
  6331.         way down the stack.
  6332.  
  6333.         See Also:
  6334.  
  6335.         wclose() wopen() wactivate()
  6336.  
  6337.         Example:
  6338.  
  6339.         int w;
  6340.         int w2;
  6341.  
  6342.         w = wopen(10,10,20,70,2);     /* Open a large window */
  6343.         w2 = wopen(5,5,17,54,3);
  6344.  
  6345.         wcloseall();                  /* Restore covered screen area */
  6346.  
  6347.  
  6348.  
  6349.                                                                 wcls
  6350.         Summary:
  6351.  
  6352.         void wcls(num);
  6353.         int num;                 /* Number of Window to Clear */
  6354.  
  6355.         Created: 03/03/86        Last Updated: 07/12/88
  6356.  
  6357.         Author: Bob Pritchett    Source in: COUTPUT.C
  6358.  
  6359.         Requires: Nothing.
  6360.  
  6361.         Description:
  6362.  
  6363.         This  routine  will clear the specified window with it's  current
  6364.         interior  attributes.   If  not active the  cleared  window  will
  6365.         become the foremost window.
  6366.  
  6367.         See Also:
  6368.  
  6369.         cls() ccls()
  6370.  
  6371.         Example:
  6372.  
  6373.         wcls(win);          /* Clear window win. */
  6374.  
  6375.  
  6376.  
  6377.                                                                 wcol
  6378.         Summary:
  6379.  
  6380.         int wcol(wind);
  6381.         int wind;                /* Pointer to Window to Use */
  6382.  
  6383.         Created: 03/03/86        Last Updated: 07/12/88
  6384.  
  6385.         Author: Bob Pritchett    Source in: COUTPUT.C
  6386.  
  6387.         Requires: Nothing.
  6388.  
  6389.         Description:
  6390.  
  6391.         This  function returns the number of the highest col in a window.
  6392.         If a window has siz columns,  numbered zero to five,  wcol() will
  6393.         return a five.  Mostly an internal routine.
  6394.  
  6395.         Return Value:
  6396.  
  6397.         The number of the highest column in the window.
  6398.  
  6399.         See Also:
  6400.  
  6401.         wrow()
  6402.  
  6403.         Example:
  6404.  
  6405.         x = wcol(w3);            /* Returns the number of highest row */
  6406.  
  6407.  
  6408.  
  6409.                                                               wcolor
  6410.         Summary:
  6411.  
  6412.         void wcolor(insd,bord);
  6413.         int insd;                /* Color For Window Interior */
  6414.         int bord;                /* Color For Window Border */
  6415.  
  6416.         Created: 03/03/86        Last Updated: 07/12/88
  6417.  
  6418.         Author: Bob Pritchett    Source in: COUTPUT.C
  6419.  
  6420.         Requires: Nothing.
  6421.  
  6422.         Description:
  6423.  
  6424.         This  routine sets the current colors for the inside and  outside
  6425.         of  windows.   These  are  the  defaults used when  a  window  is
  6426.         created.   The difference between color() and wcolor()  primarily
  6427.         is that color has two arguments,  the fore and background colors,
  6428.         and  wcolor  makes you add the fore and back into one number  for
  6429.         both the inside and border colors.   Also,  the color()  function
  6430.         sets  both  border and inside attributes to be  the  same,  while
  6431.         wcolor() allows them to be set to different values.
  6432.  
  6433.         See Also:
  6434.  
  6435.         color()
  6436.  
  6437.         Example:
  6438.  
  6439.         wcolor(WHT_F+BLU_B,BLU_F+WHT_F);
  6440.              /* Inside is white on blue, border is blue on white. */
  6441.  
  6442.  
  6443.  
  6444.                                                              wdelete
  6445.         Summary:
  6446.  
  6447.         int wdelete(num,row,tms)
  6448.         int num;                 /* Pointer to Window to Use */
  6449.         int row;                 /* Row to Delete Line Before */
  6450.         int tms;                 /* Number of Lines to Delete */
  6451.  
  6452.         Created: 04/30/86        Last Updated: 07/12/88
  6453.  
  6454.         Author: Bob Pritchett    Source in: COUTPUT.C
  6455.  
  6456.         Requires: Nothing.
  6457.  
  6458.         Description:
  6459.  
  6460.         This  routine deletes tms lines starting with the line number  in
  6461.         row, and moves all lower lines up, making blanks at the bottom of
  6462.         the window.
  6463.  
  6464.         Return Value:
  6465.  
  6466.         0 if successful, -1 if an invalid argument is given.
  6467.  
  6468.         See Also:
  6469.  
  6470.         winsert() wblank()
  6471.  
  6472.         Example:
  6473.  
  6474.         wdelete(win,2,4);   /* Delete 4 line starting with line 2,
  6475.                                so line 6 becomes line 2 etc. */
  6476.  
  6477.  
  6478.  
  6479.                                                            wfbreakon
  6480.         Summary:
  6481.  
  6482.         #include "skey.h"        /* Needed Only for Key Descriptions */
  6483.  
  6484.         void wfbreakon(x);
  6485.         int x;                   /* Special Key to Break On */
  6486.  
  6487.         Created: 06/29/87        Last Updated: 07/12/88
  6488.  
  6489.         Author: Bob Pritchett    Source in: WFINPUT.C
  6490.  
  6491.         Requires: Nothing.
  6492.  
  6493.         Description:
  6494.  
  6495.         This  function  allows the programmer to set which  special  keys
  6496.         will cause the wfinptstred() to exit.  Each call to this function
  6497.         adds the argument given to the list of break keys.  (The #include
  6498.         file  SKEY.H  contains easy definitions for  the  special  keys.)
  6499.         When given zero as an argument the list is cleared.
  6500.  
  6501.         The default break keys are HOME, END, PGUP, PGDN, UARROW, DARROW,
  6502.         ALTE, ALTX, and ALTQ.
  6503.  
  6504.         See Also:
  6505.  
  6506.         fbreakon() wfinptstred()
  6507.  
  6508.         Example:
  6509.  
  6510.         #include "skey.h"
  6511.  
  6512.         char temp[30];
  6513.  
  6514.         wfbreakon(0);                   /* Clear List */
  6515.         wfbreakon(ALTH);                /* Alt-H Only */
  6516.  
  6517.         if ( wfinptstred(10,10,25,temp,"Default") == ALTH )
  6518.            help();
  6519.  
  6520.  
  6521.  
  6522.                                                               wfchar
  6523.         Summary:
  6524.  
  6525.         int wfchar(chr);
  6526.         int chr;                 /* Character to Use in Fields */
  6527.  
  6528.         Created: 10/19/86        Last Updated: 07/12/88
  6529.  
  6530.         Author: Bob Pritchett    Source in: WFINPUT.C
  6531.  
  6532.         Requires: Nothing.
  6533.  
  6534.         Description:
  6535.  
  6536.         Behaving  in a manner almost identical to that of  fchar(),  this
  6537.         function  will  set  the background character  for  window  field
  6538.         input,  or,  given an argument of -1, return the current value in
  6539.         use.   Note  that  this value is independant of the one  used  by
  6540.         fchar(),  although  they both use the same default of  the  space
  6541.         character.
  6542.  
  6543.         Return Value:
  6544.  
  6545.         Returns  the argument,  or in the case of the argument being  -1,
  6546.         the current value of the window field background character.
  6547.  
  6548.         See Also:
  6549.  
  6550.         fchar() wfcolor() wffill() finptint() finptstr()
  6551.  
  6552.         Example:
  6553.  
  6554.         int w;
  6555.  
  6556.         wfchar('*');              /* Set background to *'s. */
  6557.  
  6558.         w = wopen(10,0,20,79,3);
  6559.  
  6560.         wprintf(w,"The current background character is: %c.\n"
  6561.                 ,wfchar(-1));
  6562.  
  6563.  
  6564.  
  6565.                                                              wfcolor
  6566.         Summary:
  6567.  
  6568.         #include "color.h"       /* For Color Defintions Only */
  6569.  
  6570.         int wfcolor(clr);
  6571.         int clr;                 /* Color to Use in Window Fields */
  6572.  
  6573.         Created: 10/19/86        Last Updated: 07/12/88
  6574.  
  6575.         Author: Bob Pritchett    Source in: WFINPUT.C
  6576.  
  6577.         Requires: Nothing.
  6578.  
  6579.         Description:
  6580.  
  6581.         Behaving as does fcolor(), wfcolor() will set the field color for
  6582.         window  field input routines.   This value is independant of  the
  6583.         one used by normal field routines,  and the current value will be
  6584.         returned if the argument is -1.
  6585.  
  6586.         Return Value:
  6587.  
  6588.         Returns  the argument,  or in the case of the argument being  -1,
  6589.         the current value of the window field color.
  6590.  
  6591.         See Also:
  6592.  
  6593.         fcolor() wfchar() wffill() wfinptint() wfinptstr()
  6594.  
  6595.         Example:
  6596.  
  6597.         #include "color.h"
  6598.  
  6599.         wfcolor(BLU_F+WHT_B);               /* Blue on white. */
  6600.  
  6601.  
  6602.  
  6603.                                                               wffill
  6604.         Summary:
  6605.  
  6606.         void wffill(w,rw,cl,mx);
  6607.         int w;                   /* Window in Which to Draw Field */
  6608.         int rw;                  /* Row of Field (Within Window) */
  6609.         int cl;                  /* Column of Field (Within Window) */
  6610.         int mx;                  /* Length of Field */
  6611.  
  6612.         Created: 12/05/86        Last Updated: 07/12/88
  6613.  
  6614.         Author: Bob Pritchett    Source in: WFINPUT.C
  6615.  
  6616.         Requires: wgotoxy() cfield()
  6617.  
  6618.         Description:
  6619.  
  6620.         This function behaves similarly to ffill(),  under whose  heading
  6621.         more  information  on  the  purpose of  wffill()  can  be  found.
  6622.         Simply,  the function uses the current window character and color
  6623.         values  to  draw  an input field in the specified window  at  the
  6624.         coordinates  given.   (The row and column values are  within  the
  6625.         window, not global.)
  6626.  
  6627.         See Also:
  6628.  
  6629.         ffill() wfchar() wfcolor() wfinptint() wfinptstr()
  6630.  
  6631.         Example:
  6632.  
  6633.         int w;
  6634.  
  6635.         w = wopen(5,10,10,70,1);
  6636.  
  6637.         wffill(w,10,20,10);         /* At 10,20 a 10 character field. */
  6638.  
  6639.         wputat(w,5,9,"Chrs: ");     /* A prompt for the next field. */
  6640.         wffill(w,5,15,6);           /* At 5,15 a 6 character field. */
  6641.         wgotoxy(w,5,15);            /* Not needed, as wffill() leaves */
  6642.                                     /* the cursor at the coordinates. */
  6643.         ccputs("abc",fcolor(-1));   /* Put a default value on the */
  6644.                                     /* screen with the field color. */
  6645.  
  6646.  
  6647.  
  6648.                                                            wfinptint
  6649.         Summary:
  6650.  
  6651.         int wfinptint(w,rw,cl,mx,x);
  6652.         int w;                   /* Window to Use */
  6653.         int rw;                  /* Row of Field */
  6654.         int cl;                  /* Column of Field */
  6655.         int mx;                  /* Length of Field */
  6656.         int *x;                  /* Where to Put Result */
  6657.  
  6658.         Created: 10/19/86        Last Updated: 07/12/88
  6659.  
  6660.         Author: Bob Pritchett    Source in: WFINPUT.C
  6661.  
  6662.         Requires: wgotoxy() cfield()
  6663.  
  6664.         Description:
  6665.  
  6666.         This  function  displays the specified field and then  waits  for
  6667.         input of an integer just as does finptint(),  under whose heading
  6668.         a complete description can be found.
  6669.  
  6670.         Return Value:
  6671.  
  6672.         The integer inputted is returned.
  6673.  
  6674.         See Also:
  6675.  
  6676.         inptint() wfinptintd() finptint() wffill() wfinptstr()
  6677.  
  6678.         Example:
  6679.  
  6680.         int x;
  6681.         int w;
  6682.  
  6683.         w = wopen(2,2,20,78,3);
  6684.  
  6685.         wputat(w,5,10,"Num: ");     /* A prompt for the next field. */
  6686.         wfinptint(w,5,15,6,&x);     /* At 5,15 a 6 character input. */
  6687.  
  6688.         wprintf(w,"\n\n%d was the input.\n",x);
  6689.  
  6690.  
  6691.  
  6692.                                                           wfinptintd
  6693.         Summary:
  6694.  
  6695.         int wfinptintd(w,rw,cl,mx,x,d);
  6696.         int w;                   /* Window to Use */
  6697.         int rw;                  /* Row of Field */
  6698.         int cl;                  /* Column of Field */
  6699.         int mx;                  /* Length of Field */
  6700.         int *x;                  /* Where to Put Result */
  6701.         int d;                   /* Default Integer */
  6702.  
  6703.         Created: 10/19/86        Last Updated: 07/12/88
  6704.  
  6705.         Author: Bob Pritchett    Source in: WFINPUT.C
  6706.  
  6707.         Requires: wgotoxy() cfield()
  6708.  
  6709.         Description:
  6710.  
  6711.         This  function,  which  waits for input in a window  field  after
  6712.         displaying a default value,  behaves like finptintd(), where more
  6713.         information can be found on its operation.
  6714.  
  6715.         Return Value:
  6716.  
  6717.         The integer inputted is returned,  or,  in the case of a carriage
  6718.         return, the default.
  6719.  
  6720.         See Also:
  6721.  
  6722.         inptintd() wfinptint() finptintd() wffill() wfinptstr()
  6723.  
  6724.         Example:
  6725.  
  6726.         int x;
  6727.         int w;
  6728.  
  6729.         w = wopen(3,3,22,77,'*');
  6730.  
  6731.         wputat(w,5,10,"Num: ");     /* A prompt for the next field. */
  6732.         wfinptintd(w,5,15,4,&x,37); /* At 5,15 a 4 character input. */
  6733.  
  6734.         if ( x == 37 )
  6735.            wprintf(w,"\n\nThe default, 37, was returned.\n");
  6736.         else
  6737.            wprintf(w,"\n\n%d was the input.\n",x);
  6738.  
  6739.  
  6740.  
  6741.                                                           wfinptintr
  6742.         Summary:
  6743.  
  6744.         int wfinptintr(w,rw,cl,mx,x,lw,hg);
  6745.         int w;                   /* Window to Use */
  6746.         int rw;                  /* Row of Field */
  6747.         int cl;                  /* Column of Field */
  6748.         int mx;                  /* Length of Field */
  6749.         int *x;                  /* Where to Put Result */
  6750.         int lw;                  /* Minimum Acceptable Value */
  6751.         int hg;                  /* Maximum Acceptable Value */
  6752.  
  6753.         Created: 10/19/86        Last Updated: 07/12/88
  6754.  
  6755.         Author: Bob Pritchett    Source in: WFINPUT.C
  6756.  
  6757.         Requires: wfinptint()
  6758.  
  6759.         Description:
  6760.  
  6761.         This  function,  with the exception that it works within windows,
  6762.         will  act  like finptintr(),  waiting for an integer  within  its
  6763.         specified range.  All other input will cause the function to beep
  6764.         and wait.
  6765.  
  6766.         Return Value:
  6767.  
  6768.         The inputted integer, within the range, is returned.
  6769.  
  6770.         See Also:
  6771.  
  6772.         inptintr() wfinptint() finptintr() wffill() wfinptstr()
  6773.         wfinptintrd()
  6774.  
  6775.         Example:
  6776.  
  6777.         int x;
  6778.         int w;
  6779.  
  6780.         w = wopen(1,1,23,78,'#');
  6781.  
  6782.         wputat(w,5,10,"Num: ");      /* A prompt for the next field. */
  6783.         wfinptintr(w,5,15,4,&x,3,10);/* At 5,15 a 4 character input */
  6784.                                      /* greater than 2 and less than */
  6785.                                      /* ten. */
  6786.  
  6787.  
  6788.  
  6789.                                                          wfinptintrd
  6790.         Summary:
  6791.  
  6792.         int wfinptintrd(w,rw,cl,mx,x,lw,hg,d);
  6793.         int w;                   /* Window to Use */
  6794.         int rw;                  /* Row of Field */
  6795.         int cl;                  /* Column of Field */
  6796.         int mx;                  /* Length of Field */
  6797.         int *x;                  /* Where to Put Result */
  6798.         int lw;                  /* Minimum Acceptable Value */
  6799.         int hg;                  /* Maximum Acceptable Value */
  6800.         int d;                   /* Default Value */
  6801.  
  6802.         Created: 10/19/86        Last Updated: 07/12/88
  6803.  
  6804.         Author: Bob Pritchett    Source in: WFINPUT.C
  6805.  
  6806.         Requires: wfinptintd()
  6807.  
  6808.         Description:
  6809.  
  6810.         This  function  behaves as does  finptintrd(),  only  within  the
  6811.         specified  window.   Remember that the function makes no check to
  6812.         see  if the default is within the specified range,  and if it  is
  6813.         not it will not be returnable.
  6814.  
  6815.         Return Value:
  6816.  
  6817.         The inputted integer,  within the range,  is returned, or, in the
  6818.         case  of a carriage return as the first inputted  character,  the
  6819.         default value.
  6820.  
  6821.         See Also:
  6822.  
  6823.         inptintr() wfinptintr() finptintrd() wffill() wfinptstr()
  6824.         finptintr()
  6825.  
  6826.         Example:
  6827.  
  6828.         int x;
  6829.         int w;
  6830.  
  6831.         w = wopen(2,2,20,78,2);
  6832.  
  6833.         wputat(w,5,10,"Num: ");       /* A prompt for the next field. */
  6834.         wfinptintrd(w,5,15,4,&x,3,10,5);  /* At 5,15 a 4 character */
  6835.                                      /* input greater than 2 and less */
  6836.                                      /* than ten, or 5. */
  6837.  
  6838.  
  6839.  
  6840.                                                            wfinptstr
  6841.         Summary:
  6842.  
  6843.         char *wfinptstr(w,rw,cl,mx,str);
  6844.         int w;                   /* Window to Use */
  6845.         int rw;                  /* Row of Field */
  6846.         int cl;                  /* Column of Field */
  6847.         int mx;                  /* Length of Field */
  6848.         char *str;               /* Where to Place Input */
  6849.  
  6850.         Created: 10/19/86        Last Updated: 07/12/88
  6851.  
  6852.         Author: Bob Pritchett    Source in: WFINPUT.C
  6853.  
  6854.         Requires: wgotoxy() cfield()
  6855.  
  6856.         Description:
  6857.  
  6858.         This  function  is  the windowing equivalent  of  finptstr()  and
  6859.         performs  just  like it.   See the description of finptstr()  for
  6860.         more information on this routine.
  6861.  
  6862.         Return Value:
  6863.  
  6864.         A pointer to a duplicate of the inputted string is returned,  via
  6865.         strdup().
  6866.  
  6867.         See Also:
  6868.  
  6869.         inptstr() finptstr() wfinptint() wffill() wfinptstr()
  6870.         wfinptstrd()
  6871.  
  6872.         Example:
  6873.  
  6874.         char temp[80];
  6875.         int w;
  6876.  
  6877.         w = wopen(1,1,20,78,1);
  6878.  
  6879.         wfinptstr(w,10,10,25,temp);
  6880.  
  6881.  
  6882.  
  6883.                                                           wfinptstrd
  6884.         Summary:
  6885.  
  6886.         char *wfinptstrd(w,rw,cl,mx,str,def);
  6887.         int w;                   /* Window to Use */
  6888.         int rw;                  /* Row of Field */
  6889.         int cl;                  /* Column of Field */
  6890.         int mx;                  /* Length of Field */
  6891.         char *str;               /* Where to Place Input */
  6892.         char *def;               /* Default String */
  6893.  
  6894.         Created: 10/19/86        Last Updated: 07/12/88
  6895.  
  6896.         Author: Bob Pritchett    Source in: WFINPUT.C
  6897.  
  6898.         Requires: wgotoxy() cfield()
  6899.  
  6900.         Description:
  6901.  
  6902.         This  function displays the specified field in the  window  along
  6903.         with the default string.  A string may be inputted or the default
  6904.         returned in the same manner as with finptstrd().
  6905.  
  6906.         Return Value:
  6907.  
  6908.         A pointer to a duplicate of the inputted string,  or the default,
  6909.         is returned, via strdup().
  6910.  
  6911.         See Also:
  6912.  
  6913.         inptstrd() wfinptint() wfinptstred() ffill() finptstrd()
  6914.         wfinptstre()
  6915.  
  6916.         Example:
  6917.  
  6918.         char temp[80];
  6919.         int w;
  6920.  
  6921.         w = wopen(10,10,20,70,4);
  6922.  
  6923.         wfinptstrd(w,5,5,25,temp,"C Spot Run");
  6924.  
  6925.  
  6926.  
  6927.                                                           wfinptstre
  6928.         Summary:
  6929.  
  6930.         void wfinptstre(w,rw,cl,mx,str);
  6931.         int w;                   /* Window to Use */
  6932.         int rw;                  /* Row of Field */
  6933.         int cl;                  /* Column of Field */
  6934.         int mx;                  /* Length of Field */
  6935.         char *str;               /* Where to Place Input */
  6936.  
  6937.         Created: 10/19/86        Last Updated: 07/12/88
  6938.  
  6939.         Author: Bob Pritchett    Source in: WFINPUT.C
  6940.  
  6941.         Requires: wfinptstred()
  6942.  
  6943.         Description:
  6944.  
  6945.         This  function  calls  wfinptstred() with a null  string  as  the
  6946.         default  argument.   It will continue to do so until an input  is
  6947.         made.
  6948.  
  6949.         See Also:
  6950.  
  6951.         inptstr() finptstr() wfinptint() wffill() wfinptstr()
  6952.         wfinptstred() finptstre()
  6953.  
  6954.         Example:
  6955.  
  6956.         char temp[80];
  6957.         int w;
  6958.  
  6959.         w = wopen(2,2,20,78,5);
  6960.  
  6961.         wfinptstre(w,10,10,25,temp);
  6962.  
  6963.         wprintf(w,"temp contains: >%s<\n");
  6964.  
  6965.  
  6966.  
  6967.                                                          wfinptstred
  6968.         Summary:
  6969.  
  6970.         int wfinptstred(w,rw,cl,mx,str,def);
  6971.         int w;                   /* Window to Use */
  6972.         int rw;                  /* Row of Field */
  6973.         int cl;                  /* Column of Field */
  6974.         int mx;                  /* Length of Field */
  6975.         char *str;               /* Where to Place Input */
  6976.         char *def;               /* Default String */
  6977.  
  6978.         Created: 10/19/86        Last Updated: 07/12/88
  6979.  
  6980.         Author: Bob Pritchett    Source in: WFINPUT.C
  6981.  
  6982.         Requires: wgotoxy() cfield()
  6983.  
  6984.         Description:
  6985.  
  6986.         This  function  behaves as does finptstred() with  the  exception
  6987.         that  it  works within a window.   Due to the complexity of  this
  6988.         routine  and  the  fact  that it  is  functionally  identical  to
  6989.         finptstred() the complete description is not repeated here.
  6990.  
  6991.         Return Value:
  6992.  
  6993.         A  one is returned unless input was terminated by a special  key,
  6994.         in which case its value will be returned.  (Special keys return a
  6995.         null followed by an integer.  The integer is returned here.)
  6996.  
  6997.         See Also:
  6998.  
  6999.         inptstr() wfinptint() wfinptstred() wffill() wfinptstr()
  7000.         finptstred() wfbreakon()
  7001.  
  7002.         Example:
  7003.  
  7004.         char temp[80];
  7005.         int x;
  7006.         int w;
  7007.  
  7008.         w = wopen(4,4,20,70,5);
  7009.  
  7010.         x = wfinptstred(w,10,10,25,temp,"C Spot Run");
  7011.  
  7012.         if ( x != 1 )                 /* Special Value */
  7013.            process(x);                /* Process Key */
  7014.  
  7015.  
  7016.  
  7017.                                                             wfinptyn
  7018.         Summary:
  7019.  
  7020.         int wfinptyn(w,rw,cl);
  7021.         int w;                   /* Window to Use */
  7022.         int rw;                  /* Row of Field */
  7023.         int cl;                  /* Column of Field */
  7024.  
  7025.         Created: 10/19/86        Last Updated: 07/12/88
  7026.  
  7027.         Author: Bob Pritchett    Source in: WFINPUT.C
  7028.  
  7029.         Requires: wgotoxy() cfield()
  7030.  
  7031.         Description:
  7032.  
  7033.         This function behaves as does finptyn(), only within a window.  A
  7034.         description of how it functions is available under the  finptyn()
  7035.         heading.
  7036.  
  7037.         Return Value:
  7038.  
  7039.         A one or a zero for a 'Y' or an 'N'.
  7040.  
  7041.         See Also:
  7042.  
  7043.         inptyn() finptyn() wfinptint() wffill() wfinptstr() wfinptynd()
  7044.  
  7045.         Example:
  7046.  
  7047.         char temp[80];
  7048.         int w;
  7049.  
  7050.         w = wopen(1,1,23,78,' ');
  7051.  
  7052.         wfinptyn(w,10,10);
  7053.  
  7054.  
  7055.  
  7056.                                                            wfinptynd
  7057.         Summary:
  7058.  
  7059.         int wfinptynd(w,rw,cl,def);
  7060.         int w;                   /* Window to Use */
  7061.         int rw;                  /* Row of Field */
  7062.         int cl;                  /* Column of Field */
  7063.         int def;                 /* Default Input */
  7064.  
  7065.         Created: 10/19/86        Last Updated: 07/12/88
  7066.  
  7067.         Author: Bob Pritchett    Source in: WFINPUT.C
  7068.  
  7069.         Requires: wgotoxy() cfield()
  7070.  
  7071.         Description:
  7072.  
  7073.         This function behaves within a window in a manner similar to that
  7074.         of finptynd(), where a complete description of the both functions
  7075.         can be found.
  7076.  
  7077.         Return Value:
  7078.  
  7079.         A one or a zero for a 'Y' or an 'N', or whatever the default was.
  7080.  
  7081.         See Also:
  7082.  
  7083.         inptynd() finptynd() wfinptint() wffill() wfinptstr() wfinptyn()
  7084.  
  7085.         Example:
  7086.  
  7087.         char temp[80];
  7088.         int w;
  7089.  
  7090.         w = wopen(12,12,20,70,'+');
  7091.  
  7092.         wfinptynd(w,10,10,1);                   /* Default to Yes */
  7093.  
  7094.  
  7095.  
  7096.                                                              wfreeze
  7097.         Summary:
  7098.  
  7099.         void wfreeze(num,top,bot);
  7100.         int num;                 /* Pointer to Window to Use */
  7101.         int top;                 /* First Scrollable Line */
  7102.         int bot;                 /* Last Scrollable Line */
  7103.  
  7104.         Created: 04/16/86        Last Updated: 07/12/88
  7105.  
  7106.         Author: Bob Pritchett    Source in: COUTPUT.C
  7107.  
  7108.         Requires: Nothing.
  7109.  
  7110.         Description:
  7111.  
  7112.         This  routine  allows  you to set the scrollable lines  within  a
  7113.         window.  When text a newline is printed on the last line inside a
  7114.         window, the text scrolls up.  This routine allows you to 'freeze'
  7115.         a  number  of lines at the top and bottom  of  the  window.   The
  7116.         numbers  specified are the first and last scrollable  lines,  and
  7117.         the default, full window, values are 0 and wrow(num).
  7118.  
  7119.         No error checking is performed on the values.
  7120.  
  7121.         The wcls() routine will only clear scrollable lines,  and whome()
  7122.         will  home  the  cursor  to  the first  character  on  the  first
  7123.         scrollable line.   Reset the wfreeze() values to 0 and  wrow(num)
  7124.         to clear an entire window.
  7125.  
  7126.         Example:
  7127.  
  7128.         wfreeze(w2,2,wrow(w2)-3);     /* Freeze lines 0-1 at top, and the
  7129.                                          bottom three lines. */
  7130.  
  7131.  
  7132.  
  7133.                                                              wgotoxy
  7134.         Summary:
  7135.  
  7136.         void wgotoxy(num,row,col);
  7137.         int num;                 /* Pointer to Window to Use */
  7138.         int row;                 /* Row In Window to Go To */
  7139.         int col;                 /* Col In Window to Go To */
  7140.  
  7141.         Created: 03/03/86        Last Updated: 07/12/88
  7142.  
  7143.         Author: Bob Pritchett    Source in: COUTPUT.C
  7144.  
  7145.         Requires: Nothing.
  7146.  
  7147.         Description:
  7148.  
  7149.         This routine perfomrs the same function as gotoxy() within window
  7150.         coordinates.   Remember that as on the screen, window coordinates
  7151.         start numbering at 0,0.
  7152.  
  7153.         See Also:
  7154.  
  7155.         gotoxy() whome()
  7156.  
  7157.         Example:
  7158.  
  7159.         wgotoxy(w1,2,4);        /* Put cursor at 2,4 in window 1. */
  7160.  
  7161.  
  7162.  
  7163.                                                               whline
  7164.         Summary:
  7165.  
  7166.         void whline(wind,row);
  7167.         int wind;                /* Window to Draw in */
  7168.         int row;                 /* Row to Draw Line on */
  7169.  
  7170.         Created: 03/03/86        Last Updated: 07/12/88
  7171.  
  7172.         Author: Bob Pritchett    Source in: COUTPUT.C
  7173.  
  7174.         Requires: chline()
  7175.  
  7176.         Description:
  7177.  
  7178.         This  function calls chline() with the correct parameters to draw
  7179.         a  horizontal line in the specified window.   The correct  colors
  7180.         and border styles are used.
  7181.  
  7182.         See Also:
  7183.  
  7184.         chline() wvline()
  7185.  
  7186.         Example:
  7187.  
  7188.         #include "color.h"       /* Just for the colors... */
  7189.  
  7190.         int w;
  7191.  
  7192.         w = wopen(5,5,20,60,1);  /* A box with a single line border */
  7193.  
  7194.         whline(w,7);        /* Draws a line across the box */
  7195.  
  7196.  
  7197.  
  7198.                                                                whome
  7199.         Summary:
  7200.  
  7201.         void whome(num);
  7202.         int num;                 /* Pointer to Window to Use */
  7203.  
  7204.         Created: 04/20/86        Last Updated: 07/12/88
  7205.  
  7206.         Author: Bob Pritchett    Source in: COUTPUT.C
  7207.  
  7208.         Requires: Nothing.
  7209.  
  7210.         Description:
  7211.  
  7212.         This routine homes the cursor to the same coordinates as would be
  7213.         used  in a window clear with wcls(),  the upper  left  scrollable
  7214.         character in the specified window.
  7215.  
  7216.         See Also:
  7217.  
  7218.         gotoxy() wgotoxy()
  7219.  
  7220.         Example:
  7221.  
  7222.         wfreeze(w,3,wrow(num));  /* First three lines frozen. (0-2) */
  7223.         whome(w);                /* Cursor goes to 3,0. */
  7224.  
  7225.  
  7226.  
  7227.                                                             winptint
  7228.         Summary:
  7229.  
  7230.         int winptint(w,prompt);
  7231.         int w;                   /* Window to Input Within */
  7232.         char *prompt;            /* Prompt for Input */
  7233.  
  7234.         Created: 08/16/86        Last Updated: 07/12/88
  7235.  
  7236.         Author: Bob Pritchett    Source in: WINPUT.C
  7237.  
  7238.         Requires: Nothing.
  7239.  
  7240.         Description:
  7241.  
  7242.         This function performs the same function as inptint() only within
  7243.         the specified window.
  7244.  
  7245.         Return Value:
  7246.  
  7247.         The integer inputted.
  7248.  
  7249.         See Also:
  7250.  
  7251.         inptint() winptintd() winptintr() winptintrd()
  7252.  
  7253.         Example:
  7254.  
  7255.         int w;
  7256.  
  7257.         w = wopen(2,5,10,76,3);
  7258.  
  7259.         wprintf(w,"winptint() returns: %d.\n"
  7260.                ,winptint(w,"Enter Integer:"));
  7261.  
  7262.              /* The above function prompts "Enter Integer: " and then */
  7263.              /* executes the wprintf statement. */
  7264.  
  7265.  
  7266.  
  7267.                                                            winptintd
  7268.         Summary:
  7269.  
  7270.         int winptintd(w,prompt,def);
  7271.         int w;                   /* Window to Input Within */
  7272.         char *prompt;            /* Prompt for Input */
  7273.         int def;                 /* Default Integer */
  7274.  
  7275.         Created: 08/16/86        Last Updated: 07/12/88
  7276.  
  7277.         Author: Bob Pritchett    Source in: WINPUT.C
  7278.  
  7279.         Requires: Nothing.
  7280.  
  7281.         Description:
  7282.  
  7283.         This  functions prompts and waits for an integer,  or a  carriage
  7284.         return,  in which case it returns the default integer.   Refer to
  7285.         inptintd() for details.
  7286.  
  7287.         Return Value:
  7288.  
  7289.         The integer inputted, or the default.
  7290.  
  7291.         See Also:
  7292.  
  7293.         inptintd() winptint() winptintr() winptintrd()
  7294.  
  7295.         Example:
  7296.  
  7297.         int w;
  7298.  
  7299.         w = wopen(4,1,8,78,2);
  7300.  
  7301.         wprintf(w,"winptintd() returns: %d.\n"
  7302.                ,winptintd(w,"Enter Integer:",7));
  7303.  
  7304.              /* The above function prompts "Enter Integer: " and then */
  7305.              /* executes the wprintf statement. */
  7306.  
  7307.  
  7308.  
  7309.                                                            winptintr
  7310.         Summary:
  7311.  
  7312.         int winptintr(w,prompt,low,high);
  7313.         int w;                   /* Window to Input Within */
  7314.         char *prompt;            /* Prompt for Input */
  7315.         int low;                 /* Lowest Acceptable Input */
  7316.         int high;                /* Highest Acceptable Input */
  7317.  
  7318.         Created: 08/16/86        Last Updated: 07/12/88
  7319.  
  7320.         Author: Bob Pritchett    Source in: WINPUT.C
  7321.  
  7322.         Requires: Nothing.
  7323.  
  7324.         Description:
  7325.  
  7326.         Performing in the same manner as inptintr() this function prompts
  7327.         for  an  integer  within a range and waits until a valid  one  is
  7328.         received.  For details refer to inptintr().
  7329.  
  7330.         Return Value:
  7331.  
  7332.         The integer inputted, within the specified range.
  7333.  
  7334.         See Also:
  7335.  
  7336.         inptintr() winptint() winptintd() winptintrd()
  7337.  
  7338.         Example:
  7339.  
  7340.         int w;
  7341.  
  7342.         w = wopen(1,1,20,78,1);
  7343.  
  7344.         wprintf(w,"winptintr() returns: %d.\n",winptintr(w
  7345.                ,"Enter Integer:",5,62));
  7346.  
  7347.              /* The above function prompts "Enter Integer: " and then */
  7348.              /* executes the wprintf statement.  The returned value */
  7349.              /* will be greater than 4 and less than 63. */
  7350.  
  7351.  
  7352.  
  7353.                                                           winptintrd
  7354.         Summary:
  7355.  
  7356.         int winptintrd(w,prompt,low,high,def);
  7357.         int w;                   /* Window to Input Within */
  7358.         char *prompt;            /* Prompt for Input */
  7359.         int low;                 /* Lowest Acceptable Input */
  7360.         int high;                /* Highest Acceptable Input */
  7361.         int def;                 /* Default Value */
  7362.  
  7363.         Created: 08/16/86        Last Updated: 07/12/88
  7364.  
  7365.         Author: Bob Pritchett    Source in: WINPUT.C
  7366.  
  7367.         Requires: Nothing.
  7368.  
  7369.         Description:
  7370.  
  7371.         Behaving  as  does inptintrd() this function prompts  within  the
  7372.         specified  window  with  the default integer and  waits  until  a
  7373.         carriage return is hit, in which case the default is returned, or
  7374.         an integer within the specified range is entered.
  7375.  
  7376.         Return Value:
  7377.  
  7378.         The integer inputted, or the default, within the specified range.
  7379.  
  7380.         See Also:
  7381.  
  7382.         inptintrd() winptint() winptintd() winptintr()
  7383.  
  7384.         Example:
  7385.  
  7386.         int w;
  7387.  
  7388.         w = wopen(2,2,10,70,5);
  7389.  
  7390.         wprintf(w,"winptintrd() returns: %d.\n"
  7391.                ,winptintrd(w,"Enter Integer:",8,50,30));
  7392.  
  7393.              /* The above function prompts "Enter Integer: 30" and */
  7394.              /* then executes the wprintf statement.  The returned */
  7395.              /* value will be greater than 7 and less than 51. */
  7396.  
  7397.  
  7398.  
  7399.                                                             winptstr
  7400.         Summary:
  7401.  
  7402.         char *winptstr(prompt);
  7403.         int w;                   /* Window to Input Within */
  7404.         char *prompt;            /* Prompt for Input */
  7405.  
  7406.         Created: 08/25/86        Last Updated: 07/12/88
  7407.  
  7408.         Author: Bob Pritchett    Source in: WINPUT.C
  7409.  
  7410.         Requires: Nothing.
  7411.  
  7412.         Description:
  7413.  
  7414.         This  function  is  the  window  equivalent  of  inptstr().    It
  7415.         functions  in  an  identical manner with the exception  that  the
  7416.         prompt and input are within the window.
  7417.  
  7418.         Return Value:
  7419.  
  7420.         The character string inputted.
  7421.  
  7422.         See Also:
  7423.  
  7424.         inptstr() winptstrd() wfinptstr() wfinptstrd() wfinptstre()
  7425.         wfinptstred()
  7426.  
  7427.         Example:
  7428.  
  7429.         int w;
  7430.  
  7431.         w = wopen(2,2,20,78,'*');               /* Border of *'s. */
  7432.  
  7433.         wprintf(w,"Hello there, %s.\n",winptstr(w,"Your name?"));
  7434.  
  7435.  
  7436.  
  7437.                                                            winptstrd
  7438.         Summary:
  7439.  
  7440.         char *winptstrd(win,prompt,def);
  7441.         int win;                 /* Window to Input Within */
  7442.         char *prompt;            /* Prompt for Input */
  7443.         char *def;               /* Default String */
  7444.  
  7445.         Created: 08/25/86        Last Updated: 07/12/88
  7446.  
  7447.         Author: Bob Pritchett    Source in: WINPUT.C
  7448.  
  7449.         Requires: Nothing.
  7450.  
  7451.         Description:
  7452.  
  7453.         This function performs like winptstr() with the exception that it
  7454.         prompts  with  a default string that is returned  if  a  carriage
  7455.         return  is entered as the first keystroke.   For more information
  7456.         see inptstrd().
  7457.  
  7458.         Return Value:
  7459.  
  7460.         The character string inputted, or the default string.
  7461.  
  7462.         See Also:
  7463.  
  7464.         inptstrd() winptstr() wfinptstr() wfinptstrd() wfinptstre()
  7465.         wfinptstred()
  7466.  
  7467.         Example:
  7468.  
  7469.         int w;
  7470.  
  7471.         w = wopen(4,2,10,76,2);
  7472.  
  7473.         wprintf(w,"Hello there, %s.\n"
  7474.                ,winptstrd(w,"Your name?","Robert"));
  7475.  
  7476.  
  7477.  
  7478.                                                              winptyn
  7479.         Summary:
  7480.  
  7481.         int winptyn(win,prompt);
  7482.         int win;                 /* Window to Prompt Within */
  7483.         char *prompt;            /* Prompt for Input */
  7484.  
  7485.         Created: 08/16/86        Last Updated: 07/12/88
  7486.  
  7487.         Author: Bob Pritchett    Source in: WINPUT.C
  7488.  
  7489.         Requires: Nothing.
  7490.  
  7491.         Description:
  7492.  
  7493.         This function behaves in the same manner as  inptyn(),  prompting
  7494.         and waiting for a yes or no response.
  7495.  
  7496.         Return Value:
  7497.  
  7498.         A one or zero, dependent on the inputted character.
  7499.  
  7500.         See Also:
  7501.  
  7502.         inptyn() winptynd() wfinptyn() wfinptynd()
  7503.  
  7504.         Example:
  7505.  
  7506.         if ( winptyn(w,"Do you program microcomputers?") )
  7507.            wprintf(w,"Oh, you do.");
  7508.  
  7509.              /* Prompts 'Do you program microcomputers? (Y/N) ' */
  7510.  
  7511.  
  7512.  
  7513.                                                            winptynd
  7514.         Summary:
  7515.  
  7516.         int winptynd(win,prompt,x);
  7517.         int win;                 /* Window to Input Within */
  7518.         char *prompt;            /* Prompt for Input */
  7519.         int x;                   /* Default Answer */
  7520.  
  7521.         Created: 08/16/86        Last Updated: 07/12/88
  7522.  
  7523.         Author: Bob Pritchett    Source in: WINPUT.C
  7524.  
  7525.         Requires: Nothing.
  7526.  
  7527.         Description:
  7528.  
  7529.         This  function performs identically to winptyn() except that  the
  7530.         default  response  is the capital letter,  and is returned  if  a
  7531.         carriage return is entered.
  7532.  
  7533.         Return Value:
  7534.  
  7535.         A  one  or  zero,  dependent on the inputted  character,  or  the
  7536.         default.
  7537.  
  7538.         See Also:
  7539.  
  7540.         inptynd() winptyn() wfinptyn() wfinptynd()
  7541.  
  7542.         Example:
  7543.  
  7544.         if ( winptyn(w,"Do you program microcomputers?",1) )
  7545.            wprintf(w,"Oh, you do.");
  7546.  
  7547.              /* Prompts 'Do you program microcomputers? (Y/n) ' */
  7548.  
  7549.  
  7550.  
  7551.                                                              winsert
  7552.         Summary:
  7553.  
  7554.         int winsert(num,row,tms)
  7555.         int num;                 /* Pointer to Window to Use */
  7556.         int row;                 /* Row to Insert Line Before */
  7557.         int tms;                 /* Number of Lines to Insert */
  7558.  
  7559.         Created: 04/30/86        Last Updated: 07/12/88
  7560.  
  7561.         Author: Bob Pritchett    Source in: COUTPUT.C
  7562.  
  7563.         Requires: Nothing.
  7564.  
  7565.         Description:
  7566.  
  7567.         This  routine inserts tms lines before the specified line in  the
  7568.         specified window, scrolling all lines below down tms.  The cursor
  7569.         goes to the first column in the first new line.
  7570.  
  7571.         Return Value:
  7572.  
  7573.         0 if successful, -1 if an invalid argument is passed.
  7574.  
  7575.         See Also:
  7576.  
  7577.         wdelete() wblank()
  7578.  
  7579.         Example:
  7580.  
  7581.         winsert(win,3,2);   /* Insert two lines before line 3,
  7582.                                new lines become 3 and 4, 3 becomes
  7583.                                line 5. */
  7584.  
  7585.  
  7586.  
  7587.                                                                wjump
  7588.         Summary:
  7589.  
  7590.         void wjump(wind,x,y);
  7591.         int wind;                /* Pointer to Window to Jump */
  7592.         int x;                   /* Upper Right Row */
  7593.         int y;                   /* Upper Right Col */
  7594.  
  7595.         Created: 03/03/86        Last Updated: 07/12/88
  7596.  
  7597.         Author: Bob Pritchett    Source in: COUTPUT.C
  7598.  
  7599.         Requires: Nothing.
  7600.  
  7601.         Description:
  7602.  
  7603.         This function activates and moves the specified window to the x,y
  7604.         coordinates  given.   The window instantly 'jumps',  placing it's
  7605.         upper right hand corner at x,y.
  7606.  
  7607.         See Also:
  7608.  
  7609.         wmove()
  7610.  
  7611.         Example:
  7612.  
  7613.         wjump(w2,10,10);         /* Jumps window w2 to 10,10 */
  7614.  
  7615.  
  7616.  
  7617.                                                             wmessage
  7618.         Summary:
  7619.  
  7620.         void wmessage(win,str,val);
  7621.         int win;                 /* Window to Use */
  7622.         char *str;               /* Message to Use */
  7623.         int val;                 /* Message Location */
  7624.  
  7625.         Created: 03/03/86        Last Updated: 07/12/88
  7626.  
  7627.         Author: Bob Pritchett    Source in: COUTPUT.C
  7628.  
  7629.         Requires: wprint()
  7630.  
  7631.         Description:
  7632.  
  7633.         Using  the  window's border attribute,  this  function  prints  a
  7634.         message  to the user on the bottom border.   For more information
  7635.         see the description of wtitle().
  7636.  
  7637.         See Also:
  7638.  
  7639.         wtitle()
  7640.  
  7641.         Example:
  7642.  
  7643.         wmessage(w,"< Press a Key >",0);
  7644.  
  7645.  
  7646.  
  7647.                                                                wmove
  7648.         Summary:
  7649.  
  7650.         #include "csr.h"         /* For Direction #defines */
  7651.  
  7652.         void wmove(wind,dir);
  7653.         int wind;                /* Pointer to Window to Move */
  7654.         int dir;                 /* Direction to Move Window */
  7655.  
  7656.         Created: 03/03/86        Last Updated: 07/12/88
  7657.  
  7658.         Author: Bob Pritchett    Source in: COUTPUT.C
  7659.  
  7660.         Requires: Nothing.
  7661.  
  7662.         Description:
  7663.  
  7664.         This  function  will activate and move the specified  window  one
  7665.         space in the direction given in dir.   The dir value is a  number
  7666.         from one to four, up, right, down, and left, respectively.
  7667.  
  7668.         See Also:
  7669.  
  7670.         wjump()
  7671.  
  7672.         Example:
  7673.  
  7674.         #include "csr.h"
  7675.  
  7676.         wmove(w2,WM_UP);         /* Moves window w2 up one character */
  7677.  
  7678.  
  7679.  
  7680.                                                                wopen
  7681.         Summary:
  7682.  
  7683.         int wopen(x,y,x2,y2,type);
  7684.         int x;                   /* Upper Left Row */
  7685.         int y;                   /* Upper Left Col */
  7686.         int x2;                  /* Lower Right Row */
  7687.         int y2;                  /* Lower Right Col */
  7688.         int type;                /* Type of Border */
  7689.  
  7690.         Created: 03/03/86        Last Updated: 07/12/88
  7691.  
  7692.         Author: Bob Pritchett    Source in: COUTPUT.C
  7693.  
  7694.         Requires: cbox()
  7695.  
  7696.         Description:
  7697.  
  7698.         This function opens a video window.  The current video attributes
  7699.         are  used,  the portion of the screen covered is saved,  and then
  7700.         blanked with the interior color.  The argument type may be of any
  7701.         one  of  the valid types used by box() and cbox(), or it  may  be
  7702.         zero, in which case the window is borderless.
  7703.  
  7704.         Return Value:
  7705.  
  7706.         Returns  a  type int value needed to reference the  window  at  a
  7707.         later time.
  7708.  
  7709.         See Also:
  7710.  
  7711.         wclose() wactivate()
  7712.  
  7713.         Example:
  7714.  
  7715.         int w;
  7716.  
  7717.         w = wopen(10,10,20,70,2);     /* Open a large window */
  7718.  
  7719.  
  7720.  
  7721.                                                               wprint
  7722.         Summary:
  7723.  
  7724.         int wprint(win,str);
  7725.         int win;                 /* Window to Use */
  7726.         char *str;               /* String to Print */
  7727.  
  7728.         Created: 03/03/86        Last Updated: 07/12/88
  7729.  
  7730.         Author: Bob Pritchett    Source in: COUTPUT.C
  7731.  
  7732.         Requires: putchci()
  7733.  
  7734.         Description:
  7735.  
  7736.         Using  the window's inside attributes,  the string is printed  at
  7737.         the current cursor position within the specified window, which is
  7738.         activated  if  it  is  not  already  so.   The  following  escape
  7739.         characters may be used:
  7740.  
  7741.                   \n  Newline
  7742.                   \t  Tab
  7743.                   \r  Return
  7744.                   \f  Form-Feed, clear window
  7745.  
  7746.         Return Value:
  7747.  
  7748.         0 if successful, -1 if an invalid window is specified.
  7749.  
  7750.         See Also:
  7751.  
  7752.         wprintf()
  7753.  
  7754.         Example:
  7755.  
  7756.         wprint(w3,"This line is outputted where the cursor is.\n");
  7757.  
  7758.  
  7759.  
  7760.                                                              wprintc
  7761.         Summary:
  7762.  
  7763.         void wprintc(win,str,clr);
  7764.         int win;                 /* Window to Use */
  7765.         char *str;               /* String to Print */
  7766.         int clr;                 /* Color to Print With */
  7767.  
  7768.         Created: 07/09/87        Last Updated: 07/12/88
  7769.  
  7770.         Author: Bob Pritchett    Source in: WPRINTC.C
  7771.  
  7772.         Requires: wscolor() wprint()
  7773.  
  7774.         Description:
  7775.  
  7776.         This  function  sets  the specified window's  inside  and  border
  7777.         colors to clr and prints the string.  The colors are not reset.
  7778.  
  7779.         See Also:
  7780.  
  7781.         wprintf() wprint() wscolor()
  7782.  
  7783.         Example:
  7784.  
  7785.         wprintc(w3,"This line is output in red on white.\n",RED_F+WHT_B);
  7786.  
  7787.  
  7788.  
  7789.                                                              wprintf
  7790.         Summary:
  7791.  
  7792.         void wprintf(win,str,args...);
  7793.         int win;                 /* Window to Use */
  7794.         char *str;               /* Formatted String to Print */
  7795.         args...                  /* Formatting Arguments */
  7796.  
  7797.         Created: 03/09/86        Last Updated: 07/12/88
  7798.  
  7799.         Author: Bob Pritchett    Source in: WPRINTF.C
  7800.  
  7801.         Requires: wprint()
  7802.  
  7803.         Description:
  7804.  
  7805.         This  function  supports the full formatting capabilities of  the
  7806.         regular  printf()  function,  only  it prints  to  the  specified
  7807.         window.  A maximum of 15 formatting arguments may be included, it
  7808.         is unlikely more should be needed.
  7809.  
  7810.         See Also:
  7811.  
  7812.         wprint()
  7813.  
  7814.         Example:
  7815.  
  7816.         wprintf(w2,"This is formatting... %03d %s.\n",38,"times");
  7817.  
  7818.  
  7819.  
  7820.                                                               wputat
  7821.         Summary:
  7822.  
  7823.         void wputat(win,x,y,string);
  7824.         int win;                 /* Window to Use */
  7825.         int x;                   /* Row to Print on */
  7826.         int y;                   /* Column to Print at */
  7827.         char *string;            /* String to Print */
  7828.  
  7829.         Created: 03/09/86        Last Updated: 07/12/88
  7830.  
  7831.         Author: Bob Pritchett    Source in: WPUTAT.C
  7832.  
  7833.         Requires: wgotoxy() wprint()
  7834.  
  7835.         Description:
  7836.  
  7837.         This routine will place the string in the window specified at the
  7838.         coordinates  specified.   If not active the specified window will
  7839.         be activated.
  7840.  
  7841.         See Also:
  7842.  
  7843.         putat()
  7844.  
  7845.         Example:
  7846.  
  7847.         wputat(win,4,5,"+ The plus sign is at 4,5 in window win.");
  7848.  
  7849.  
  7850.  
  7851.                                                              wputatf
  7852.         Summary:
  7853.  
  7854.         void wputatf(num,row,col,string,args...)
  7855.         int num;                 /* Pointer to Window to Use */
  7856.         int row;                 /* Row Coordinate */
  7857.         int col;                 /* Col Coordinate */
  7858.         char *string;            /* Format String */
  7859.         args...                  /* Formatting Arguments */
  7860.  
  7861.         Created: 05/01/86        Last Updated: 07/12/88
  7862.  
  7863.         Author: Bob Pritchett    Source in: WPUTATF.C
  7864.  
  7865.         Requires: Nothing.
  7866.  
  7867.         Description:
  7868.  
  7869.         This  routine performs the same function as putatf() only  within
  7870.         the specified window.
  7871.  
  7872.         See Also:
  7873.  
  7874.         putatf() wputat() putat()
  7875.  
  7876.         Example:
  7877.  
  7878.         wputatf(win,4,6,"This line at %d,%d.",4,6);
  7879.  
  7880.  
  7881.  
  7882.                                                             wputchar
  7883.         Summary:
  7884.  
  7885.         void wputchar(num,c);
  7886.         int num;                 /* Number of Window to Use */
  7887.         int c;                   /* Character to Output in Window */
  7888.  
  7889.         Created: 04/25/86        Last Updated: 07/12/88
  7890.  
  7891.         Author: Bob Pritchett    Source in: COUTPUT.C
  7892.  
  7893.         Requires: Nothing.
  7894.  
  7895.         Description:
  7896.  
  7897.         This  function  simply  outputs  the  character  at  the  current
  7898.         position of the specified window.
  7899.  
  7900.         See Also:
  7901.  
  7902.         wprint() wprintf()
  7903.  
  7904.         Example:
  7905.  
  7906.         wputchar(win,'\n');
  7907.  
  7908.  
  7909.  
  7910.                                                                 wrow
  7911.         Summary:
  7912.  
  7913.         int wrow(wind);
  7914.         int wind;                /* Pointer to Window to Use */
  7915.  
  7916.         Created: 03/03/86        Last Updated: 07/12/88
  7917.  
  7918.         Author: Bob Pritchett    Source in: COUTPUT.C
  7919.  
  7920.         Requires: Nothing.
  7921.  
  7922.         Description:
  7923.  
  7924.         This  function returns the number of the highest row in a window.
  7925.         If a window has four lines,  numbered zero to three,  wrow() will
  7926.         return a three.  Mostly an internal routine.
  7927.  
  7928.         Return Value:
  7929.  
  7930.         Returns the number of the highest row in the window.
  7931.  
  7932.         See Also:
  7933.  
  7934.         wcol()
  7935.  
  7936.         Example:
  7937.  
  7938.         x = wrow(w3);            /* Returns the number of highest row */
  7939.  
  7940.  
  7941.  
  7942.                                                              wscolor
  7943.         Summary:
  7944.  
  7945.         #include "color.h"       /* For Color Defintitions Only */
  7946.  
  7947.         void wscolor(wind,insd,bord);
  7948.         int wind;                /* Pointer to Window to Use */
  7949.         int insd;                /* New Color For Window Insides */
  7950.         int bord;                /* New Color For Window Border */
  7951.  
  7952.         Created: 09/14/86        Last Updated: 07/12/88
  7953.  
  7954.         Author: Bob Pritchett    Source in: COUTPUT.C
  7955.  
  7956.         Requires: Nothing.
  7957.  
  7958.         Description:
  7959.  
  7960.         This function is the equivalent of wcolor() except that it has an
  7961.         affect  only  on the specified window.   It does not  change  the
  7962.         current color of the windows, but rather all subsequent output in
  7963.         that window.
  7964.  
  7965.         See Also:
  7966.  
  7967.         wcolor() wcolor()
  7968.  
  7969.         Example:
  7970.  
  7971.         #include "color.h"
  7972.  
  7973.         int w;
  7974.  
  7975.         wcolor(RED_F,BLU_F);
  7976.  
  7977.         w = wopen(10,10,20,20,1);
  7978.         wprint(w,"This is some output.\n");     /* In red. */
  7979.         wscolor(w,GRN_F,WHT_F);
  7980.         wprint(w,"This text is in green, and any border manipualtion\n");
  7981.         wprint(w,"will be in white from now on, in this window.\n");
  7982.  
  7983.  
  7984.  
  7985.                                                              wscroll
  7986.         Summary:
  7987.  
  7988.         void wscroll(num,dir,tms)
  7989.         int num;                 /* Number of Window to Use */
  7990.         int dir;                 /* Direction to Scroll in */
  7991.         int tms;                 /* Number of Lines to Scroll */
  7992.  
  7993.         Created: 03/03/86        Last Updated: 07/12/88
  7994.  
  7995.         Author: Bob Pritchett    Source in: COUTPUT.C
  7996.  
  7997.         Requires: Nothing.
  7998.  
  7999.         Description:
  8000.  
  8001.         This  function will scroll the specified window tms lines in  the
  8002.         specified  window.   The  direction is 0 for up,  or 1 for  down.
  8003.         Specifying 0 lines will clear the window.
  8004.  
  8005.         See Also:
  8006.  
  8007.         scroll()
  8008.  
  8009.         Example:
  8010.  
  8011.         wscroll(win,0,1);
  8012.  
  8013.  
  8014.  
  8015.                                                               wtitle
  8016.         Summary:
  8017.  
  8018.         void wtitle(win,str,val);
  8019.         int win;                 /* Window to Use */
  8020.         char *str;               /* Title to Use */
  8021.         int val;                 /* Title Location */
  8022.  
  8023.         Created: 03/03/86        Last Updated: 07/12/88
  8024.  
  8025.         Author: Bob Pritchett    Source in: COUTPUT.C
  8026.  
  8027.         Requires: wprint()
  8028.  
  8029.         Description:
  8030.  
  8031.         This  routine  will  place a string along the top border  of  the
  8032.         specified  window in either the center,  on the left,  or on  the
  8033.         right.  To specify the location, val is 0, center, 1, left, or 2,
  8034.         right.  The window's border attribute is used.
  8035.  
  8036.         See Also:
  8037.  
  8038.         wmessage()
  8039.  
  8040.         Example:
  8041.  
  8042.         wtitle(w,"[ Window 1 ]",1);
  8043.  
  8044.  
  8045.  
  8046.                                                               wvline
  8047.         Summary:
  8048.  
  8049.         void wvline(wind,col);
  8050.         int wind;                /* Window to Use */
  8051.         int col;                 /* Column for the Line */
  8052.  
  8053.         Created: 03/03/86        Last Updated: 07/12/88
  8054.  
  8055.         Author: Bob Pritchett    Source in: COUTPUT.C
  8056.  
  8057.         Requires: cvline() putchci() gotoxy()
  8058.  
  8059.         Description:
  8060.  
  8061.         This  function calls cvline() with the correct parameters to draw
  8062.         a vertical line in the specified window.   The correct colors and
  8063.         border styles are used.
  8064.  
  8065.         See Also:
  8066.  
  8067.         cvline() whline()
  8068.  
  8069.         Example:
  8070.  
  8071.         #include "color.h"       /* Just for the colors... */
  8072.  
  8073.         int w;
  8074.  
  8075.         w = wopen(5,5,20,60,1);  /* A box with a single line border */
  8076.  
  8077.         wvline(w,10);        /* Draws a line down the box */
  8078.  
  8079.  
  8080.  
  8081.                                                             zero_tmr
  8082.         Summary:
  8083.  
  8084.         void zero_tmr(x);
  8085.         int x;                   /* The Number of the Counter to Use */
  8086.  
  8087.         Created: 01/03/87        Last Updated: 07/12/88
  8088.  
  8089.         Author: Dave Perras      Source in: TIMERS.C
  8090.  
  8091.         Requires: get_timer()
  8092.  
  8093.         Description:
  8094.  
  8095.         This  function  sets the specified timer to the current value  of
  8096.         the real time clock, effectively 'zeroing' the counter.
  8097.  
  8098.         Return Value:
  8099.  
  8100.         Nothing is returned.
  8101.  
  8102.         See Also:
  8103.  
  8104.         get_timer() start_tmr() stop_tmr() read_tmr() reset_tmr() timer()
  8105.         init_tmr()
  8106.  
  8107.         Example:
  8108.  
  8109.         init_tmr();              /* Initialize Timers */
  8110.  
  8111.         start_tmr(5);            /* Start timer number 5. */
  8112.  
  8113.         printf("%d seconds have elapsed.\n",10 * read_tmr(5));
  8114.                   /* The above statement does not stop the timer. */
  8115.  
  8116.         zero_tmr(5);             /* Zero the timer to the current */
  8117.                                  /* time. */
  8118.  
  8119.  
  8120.  
  8121.                                                               CheckC
  8122.         Summary:
  8123.  
  8124.         Created: 12/25/85        Last Updated: 07/12/88
  8125.  
  8126.         Author: Bob Pritchett         Source: C
  8127.  
  8128.         Syntax: CheckC [/A] <source> [<source>...]
  8129.  
  8130.         Documentation:
  8131.  
  8132.                                      CheckC
  8133.  
  8134.                              A Small C Code Checker.
  8135.  
  8136.                        Copyright 1985, 1986 Bob Pritchett
  8137.                              New Dimension Software
  8138.  
  8139.                            Version 2.1 - Documentation
  8140.  
  8141.              CheckC  has  come quite some distance since version 1.3  was
  8142.         released with the first version of C Spot Run.   It now  supports
  8143.         an  analysis  mode  with  full  error  recovery,  and  is  better
  8144.         implemented over all.
  8145.              CheckC  started  as a simple bracket counter  type  program,
  8146.         checking to make sure brackets,  quotes, etc, all were present in
  8147.         even  numbers.   And  the present time it can analyze a file  and
  8148.         report syntactical errors to,  on average,  within two lines, and
  8149.         then recover in order to find any subsequent errors, assuming the
  8150.         one just found was corrected.
  8151.              CheckC may be invoked with as many file names as DOS allows,
  8152.         and  will  check  each one in order for  matching  pairs  of  all
  8153.         relevant  characters,  quotes,  and comments.   The real power is
  8154.         displayed  when  it is invoked with a /A as the  first  argument,
  8155.         followed by the file names.   In this case a rather comprehensive
  8156.         (for a character oriented program) syntax check will be executed,
  8157.         with  errors  and problem spots reported in the  format  of  line
  8158.         number followed by error description.
  8159.              CheckC  knows  when to and when not to be  checking  syntax.
  8160.         While  in comments,  everything but an end of comment is ignored.
  8161.         (NOTE!   CheckC does NOT allow for nested comments, in accordance
  8162.         with  K&R.)  The same applies to quoted strings,  with the  added
  8163.         contitions  that CheckC is aware of when to ignore quotes (as  in
  8164.         escape sequences), and when they may be missing.  (When a newline
  8165.         is  found  in a quoted string a warning is  generated  indicating
  8166.         that  further  analysis  may be incorrect.)   Single  quotes  are
  8167.         processed  under  the  rule that only one  character  is  allowed
  8168.         between  them,  the maximum physical characters being two in  the
  8169.         case of an escape sequence.
  8170.              CheckC's analysis will sometimes refer to errors  concerning
  8171.         functions or blocks.  CheckC refers to any code one bracket level
  8172.         deep  as  a  function,  and any code several brackets deep  as  a
  8173.         block.   Unfortunatly,  as  you  may open a  virtually  unlimited
  8174.         number  of blocks,  a missing open bracket can only  be  detected
  8175.         when the number of closing brackets exceeds the number of opening
  8176.  
  8177.  
  8178.  
  8179.         ones.   In  such a case an error is noted,  the missing character
  8180.         assumed,  and analysis continued.  By noting funtion vs. block in
  8181.         the error,  and tracing structured code up from the line  number,
  8182.         the missing (or extra) bracket can easily be found.
  8183.              Another  way  of  finding mismatched characters as  soon  as
  8184.         possible  is  looking  for semicolons  within  them.   Anytime  a
  8185.         semicolon  is  found  within  a  set  of  parenthesis  or  square
  8186.         brackets,  chances are that there is a missing closing  character
  8187.         within  a few lines of it.   (Semicolons within for()  statements
  8188.         will not cause this error flag.)
  8189.              If a comment is left open,  causing the rest of the file  to
  8190.         go un-analyzed,  a line number will be reported with the error at
  8191.         when  end  of file is reached.   This is the line on  which  last
  8192.         found  comment  was opened,  and from there the error  should  be
  8193.         obvious.
  8194.              On the whole,  CheckC's errors are self explanatory,  and in
  8195.         all  testing so far it has been perfectly accurate.   It is  much
  8196.         more  likely  to report a few extra errors when recovery  is  not
  8197.         complete  then  to  miss any.   Without the analysis mode  it  is
  8198.         severly crippled,  and it is recommended that you use the /A flag
  8199.         with everything unless your code varies from K&R enough to  cause
  8200.         false errors.
  8201.              I'd   appreciate  it  if  you  could  report  any  bugs   or
  8202.         suggestions, and let me know how you like it.  Good luck!
  8203.  
  8204.  
  8205.  
  8206.                                                                FLine
  8207.         Summary:
  8208.  
  8209.         Created: 03/02/86        Last Updated: 07/12/88
  8210.  
  8211.         Author: Bob Pritchett         Source: C
  8212.  
  8213.         Syntax: FLine <source> <dest>
  8214.  
  8215.         Documentation:
  8216.  
  8217.                                       FLine
  8218.  
  8219.                         A Structured Programming Utility
  8220.  
  8221.                           Copyright 1986 Bob Pritchett
  8222.                              New Dimension Software
  8223.  
  8224.                            Version 1.1 - Documentation
  8225.  
  8226.              FLine  is  a programming tool that goes through source  code
  8227.         and  places  all lines beginning with a non-whitespace  character
  8228.         into the specified output file.   This creates a useful reference
  8229.         file  containing a list of all function  declarations,  including
  8230.         arguments,   global   variables,   comments,   and  pre-processor
  8231.         directives.   (This assumes, of course that you indent the actual
  8232.         code within your source file.)
  8233.              FLine is called as:
  8234.  
  8235.         FLine <source> <dest>
  8236.  
  8237.              Where  <source> is the source code to process and <dest>  is
  8238.         the name of the file to place the output in.   Note that whatever
  8239.         is in <dest> is erased and replaced with FLine's output.
  8240.  
  8241.  
  8242.  
  8243.                                                         CSRSHELL.ASM
  8244.         Summary:
  8245.  
  8246.         Created: 09/10/86        Last Updated: 07/12/88
  8247.  
  8248.         Author: Various
  8249.  
  8250.         Documentation:
  8251.  
  8252.              CSRShell.ASM  is a small file that contains a complete shell
  8253.         for writing assembly interfaces to Microsoft C.  (In the planning
  8254.         stages   are  additions  for  conditional  assembly   for   other
  8255.         compilers.)   Things  such  as large and  small  model  assembly,
  8256.         argument   reading,   stack  setup  and  more  are  included  and
  8257.         explained.
  8258.              To make use of the shell, copy it into another appropriately
  8259.         named  file,   insert  the  correct  function  name  over  _shell
  8260.         (remember to preserve the underscore,  MSC needs it), replace the
  8261.         two  dummy argument reads with your assembly  source,  and  place
  8262.         your data in the appropriate place.
  8263.  
  8264.  
  8265.  
  8266.                                                              COLOR.H
  8267.         Summary:
  8268.  
  8269.         Created: 04/14/86        Last Updated: 07/12/88
  8270.  
  8271.         Author: Bob Pritchett
  8272.  
  8273.         Description:
  8274.  
  8275.         This  include  file  contains the define statements for  all  the
  8276.         color attributes possible in text.   The colors are listed with a
  8277.         three  letter name followed by a _ and F or B signifying fore  or
  8278.         background attribute.   To get a full attribute,  add a fore  and
  8279.         background color.  (BLU_F+RED_B)
  8280.  
  8281.         Also  included  are definitions for BOLD (which is  added  to  an
  8282.         attribute to intensify it),  NORMAL (white on black), and several
  8283.         others.   (NOTE:   Some  of  the  attriutes  are  for  monochrome
  8284.         displays  only,  for example,  UNDERLINE shows as blue on a color
  8285.         screen, and REVERSE as black on white.)
  8286.  
  8287.         For a list of all the colors and their abbreviations look at  the
  8288.         header file.
  8289.  
  8290.  
  8291.  
  8292.                                                                CSR.H
  8293.         Summary:
  8294.  
  8295.         Created: 06/28/88        Last Updated: 07/12/88
  8296.  
  8297.         Author: Bob Pritchett
  8298.  
  8299.         Description:
  8300.  
  8301.         This  header  file contains #defines to ease the use  of  certain
  8302.         functions,  such  as scroll() and wmove(), by  replacing  numeric
  8303.         arguments with readable values.  (I.E. SCROLL_UP or WM_LEFT)
  8304.  
  8305.         Additionally  it  autodetects  the  compiler  and  memory  model,
  8306.         mapping   the  Microsoft  inp()  and  outp()  to  inportp()   and
  8307.         outportp()  for Turbo C, and defining LARGE to 1 for the  compact
  8308.         and large memory models.
  8309.  
  8310.         The  CSRMENU.H  file  is  included, and all of  the  C  Spot  Run
  8311.         functions are prototyped to provide more reliable syntax checking
  8312.         at compile time.
  8313.  
  8314.  
  8315.  
  8316.                                                             CSRDOS.H
  8317.         Summary:
  8318.  
  8319.         Created: 04/04/86        Last Updated: 07/12/88
  8320.  
  8321.         Author: Bob Pritchett and Alan Losoff
  8322.  
  8323.         Description:
  8324.  
  8325.         This  header  file  contains structures  and  #define  statements
  8326.         needed by functions accessing DOS 2.0 functions.
  8327.  
  8328.  
  8329.  
  8330.                                                            CSRMENU.H
  8331.         Summary:
  8332.  
  8333.         Created: 08/08/86        Last Updated: 07/12/88
  8334.  
  8335.         Author: Bob Pritchett
  8336.  
  8337.         Description:
  8338.  
  8339.         This header file contains the typdef statement to create the MENU
  8340.         data  type needed for the function pmenu().   The structure is as
  8341.         follows:
  8342.  
  8343.         typedef struct _mnu
  8344.          {
  8345.           char title[23];               /* Title of the menu */
  8346.           int type;                     /* Style of the border */
  8347.           int border;                   /* Window's border color */
  8348.           int normal;                   /* Color for unhighlighted items */
  8349.           int bar;                      /* Color for the highlight bar */
  8350.           int row;                      /* Upper left window row */
  8351.           int col;                      /* Upper left window column */
  8352.           int num;                      /* Number of enteries */
  8353.           struct _ent
  8354.            {
  8355.             char text[25];              /* Item's name */
  8356.             int value;                  /* Return value for item / -1 Static */
  8357.            } entry[MAX_ENTRIES];
  8358.          } *MENU;
  8359.  
  8360.  
  8361.  
  8362.                                                            CSRMISC.H
  8363.         Summary:
  8364.  
  8365.         Created: 04/20/86        Last Updated: 07/12/88
  8366.  
  8367.         Author: Bob Pritchett
  8368.  
  8369.         Description:
  8370.  
  8371.         This header file contains dummy(),  iswild(),  and the defintions
  8372.         for   the  min()  and  max()  macros  which  were  ommitted  from
  8373.         Microsoft's standard library.
  8374.  
  8375.  
  8376.  
  8377.                                                           CSRMODES.H
  8378.         Summary:
  8379.  
  8380.         Created: 05/05/86        Last Updated: 07/12/88
  8381.  
  8382.         Author: Bob Pritchett
  8383.  
  8384.         Description:
  8385.  
  8386.         This  header  file contains define statements for  the  different
  8387.         video modes.  It is intended to be used with set_mode().
  8388.  
  8389.  
  8390.  
  8391.                                                           CSRSOUND.H
  8392.         Summary:
  8393.  
  8394.         Created: 08/07/86        Last Updated: 07/12/88
  8395.  
  8396.         Author: Bob Pritchett (Data from Norton's Book.)
  8397.  
  8398.         This  header  file  contains note definitions for  use  with  the
  8399.         sound()  routine in CSRSOUND.C.
  8400.  
  8401.  
  8402.  
  8403.                                                            CSRTIME.H
  8404.         Summary:
  8405.  
  8406.         Created: 05/05/86        Last Updated: 07/12/88
  8407.  
  8408.         Author: Bob Pritchett
  8409.  
  8410.         This  file contains two static char * arrays containing the names
  8411.         of the days of the week and the days of the month.   The days  of
  8412.         the week start with Sunday, the months start with a null and then
  8413.         January as the second entry,  element one, to allow compatibility
  8414.         with the way DOS returns the date.
  8415.  
  8416.  
  8417.  
  8418.                                                             ERRORS.H
  8419.         Summary:
  8420.  
  8421.         Created: 05/05/86        Last Updated: 07/12/88
  8422.  
  8423.         Author: Bob Pritchett (Data from Norton's Book.)
  8424.  
  8425.         This  file  contains  a static char * array  containing  the  DOS
  8426.         errors  returned in AX after a DOS function call.   These  errors
  8427.         are for DOS 2.X alone, and do not apply to DOS 3.X extended error
  8428.         codes.  Error descriptions start with element one.
  8429.  
  8430.  
  8431.  
  8432.                                                               SKEY.H
  8433.         Summary:
  8434.  
  8435.         Created: 02/22/86        Last Updated: 07/12/88
  8436.  
  8437.         Author: Bob Pritchett (Data from Norton's Book.)
  8438.  
  8439.         Description:
  8440.  
  8441.         This  header  file  contains #define statements for  all  of  the
  8442.         special keys and combinations on the keyboard.   These values are
  8443.         those returned as extened codes,  after a null is read.  They are
  8444.         in the basic format of KEY1KEY2,  or simply Fx for function keys.
  8445.         (Note:   Function  keys are numbered through 40,  1-10 are normal
  8446.         keys,  11-20 are shift keys,  21-30 are ctrl keys,  and 31-40 are
  8447.         alt keys.  As in: Shift-F2 returns F12.)
  8448.                           C Spot Run - Documentation
  8449.  
  8450.  
  8451.                         Appendix A - Updating the Library
  8452.  
  8453.              The  C Spot Run routine library is constantly being added to
  8454.         as  we receive contributions and write more  routines  ourselves.
  8455.         In  the interest of saving time and space,  library updates  will
  8456.         come in one of two forms.
  8457.              First,   small  collections  of  new  routines,   or  single
  8458.         routines,  will be placed in archives along with a single page of
  8459.         documentation  and  distributed via BBSs.  Registered users  will
  8460.         receive information about new updates or a copy of those updates.
  8461.         When  you  receive an update archive you simply place  the  files
  8462.         into  your  library  or  linking  directory  and  print  out  the
  8463.         documentation page,  which is then inserted in alphabetical order
  8464.         into  the library description section of this manual.   (This  is
  8465.         why  those pages are not numbered and we recommend  storing  your
  8466.         manual in a three ring binder.)
  8467.              Second,   major  updates  to  the  entire  library  will  be
  8468.         distributed  in  archives  containing all  the  routines,  and  a
  8469.         totally new version of the complete manual.   These updates  will
  8470.         be on new version numbers.
  8471.              To  keep  on top of changes to the library it  is  suggested
  8472.         that  you  read  issues  of the NDS  News  Newsletter  as  it  is
  8473.         released,  and make an occasional call to the support  BBS  where
  8474.         the  latest  version  of the library and  newsletter  are  always
  8475.         available.
  8476.                           C Spot Run - Documentation
  8477.  
  8478.  
  8479.                        Appendix B - Contacting the Author
  8480.  
  8481.              Please feel free to contact me regarding C Spot Run or other
  8482.         NDS  products.  As a shareware author I enjoy hearing from  users
  8483.         and am happy to try and assist you with any problems that you may
  8484.         encounter when using CSR.
  8485.  
  8486.              If  you  should need to contact the author of  a  particular
  8487.         routine  or function please leave a message to me on the  BBS  or
  8488.         call voice and I can help put you in touch with him or her.
  8489.  
  8490.              Bob Pritchett            (609) 424-2595 - Voice
  8491.                23 Pawtucket Drive     (609) 354-9259 - Data (300-2400B)
  8492.                Cherry Hill, NJ  08003       SEAdog/FidoNet: 107/414
  8493.                           C Spot Run - Documentation
  8494.  
  8495.  
  8496.                   Appendix C - Submitting Routines or Utilities
  8497.  
  8498.              All submissions to the routine library or utility collection
  8499.         should  be  made using the Routine/Utility Submission  Form,  and
  8500.         should be sent to the address on that form.   Please do not  make
  8501.         additions to the library or utility collection on your own,  this
  8502.         creates a problem and complicates the distribution.
  8503.              In   addition  to  the  following  form  please  enclose   a
  8504.         description  of the routine or utility,  preferably on an IBM  PC
  8505.         disk  (360K  or  1.2Meg).   Please make this description  in  the
  8506.         appropriate  format as specified in sections 4.1 and 4.2 of  this
  8507.         manual.
  8508.                           C Spot Run - Documentation
  8509.  
  8510.  
  8511.                   Appendix D - History of Versions and Changes
  8512.  
  8513.              07/12/88  -  Version  3.0  released  with  support  for  the
  8514.         Microsoft  QuickC  1.01,  MSC  5.1,  and  Borland  Turbo  C   1.5
  8515.         compilers. Volume 3 Number 1 of the NDS News distributed to users
  8516.         and the NDS Mailing List.
  8517.  
  8518.              07/12/87  -  Version  2.1  released  with  bug  fixes,   new
  8519.         routines,  Turbo C support, and a new version of the  newsletter.
  8520.         Available  complete (CSR21.ARC) and as an update to Version  2.0.
  8521.         (CSRUPDT2.ARC)
  8522.  
  8523.              06/02/87  - Preliminary  Version  2.0 support  for  Turbo  C
  8524.         released.
  8525.  
  8526.              01/15/87  - Version  2.0A replaces 2.0,  which  was  missing
  8527.         CheckC and FLine programs.
  8528.  
  8529.              01/10/87  - Version  2.0  of the library released  with  new
  8530.         features and a new newsletter.
  8531.  
  8532.              10/13/86  - Limited release of version 1.1 of the library to
  8533.         some  registered users.   Most bugs fixed,  manual  updated,  new
  8534.         routines.
  8535.  
  8536.              06/27/86 - First issue of the newsletter released.
  8537.  
  8538.              05/05/86 - Version 1.0 of the library released.
  8539.  
  8540.              03/03/86 - Coding of Windowing routines begun.
  8541.                           C Spot Run - Documentation
  8542.  
  8543.  
  8544.                             Appendix E - ASCII Table
  8545.  
  8546.                  Dec  Hex  Chr    Dec  Hex  Chr    Dec  Hex  Chr
  8547.                  ---  ---  ---    ---  ---  ---    ---  ---  ---
  8548.                    0   00  NUL     43   2B   +      86   56   V
  8549.                    1   01  SOH     44   2C   ,      87   57   W
  8550.                    2   02  STX     45   2D   -      88   58   X
  8551.                    3   03  ETX     46   2E   .      89   59   Y
  8552.                    4   04  EOT     47   2F   /      90   5A   Z
  8553.                    5   05  ENQ     48   30   0      91   5B   [
  8554.                    6   06  ACK     49   31   1      92   5C   \
  8555.                    7   07  BEL     50   32   2      93   5D   ]
  8556.                    8   08  BS      51   33   3      94   5E   ^
  8557.                    9   09  HT      52   34   4      95   5F   _
  8558.                   10   0A  LF      53   35   5      96   60   `
  8559.                   11   0B  VT      54   36   6      97   61   a
  8560.                   12   0C  FF      55   37   7      98   62   b
  8561.                   13   0D  CR      56   38   8      99   63   c
  8562.                   14   0E  SO      57   39   9     100   64   d
  8563.                   15   0F  SI      58   3A   :     101   65   e
  8564.                   16   10  DLE     59   3B   ;     102   66   f
  8565.                   17   11  DC1     60   3C   <     103   67   g
  8566.                   18   12  DC2     61   3D   =     104   68   h
  8567.                   19   13  DC3     62   3E   >     105   69   i
  8568.                   20   14  DC4     63   3F   ?     106   6A   j
  8569.                   21   15  NAK     64   40   @     107   6B   k
  8570.                   22   16  SYN     65   41   A     108   6C   l
  8571.                   23   17  ETB     66   42   B     109   6D   m
  8572.                   24   18  CAN     67   43   C     110   6E   n
  8573.                   25   19  EM      68   44   D     111   6F   o
  8574.                   26   1A  SUB     69   45   E     112   70   p
  8575.                   27   1B  ESC     70   46   F     113   71   q
  8576.                   28   1C  FS      71   47   G     114   72   r
  8577.                   29   1D  GS      72   48   H     115   73   s
  8578.                   30   1E  RS      73   49   I     116   74   t
  8579.                   31   1F  US      74   4A   J     117   75   u
  8580.                   32   20          75   4B   K     118   76   v
  8581.                   33   21   !      76   4C   L     119   77   w
  8582.                   34   22   "      77   4D   M     120   78   x
  8583.                   35   23   #      78   4E   N     121   79   y
  8584.                   36   24   $      79   4F   O     122   7A   z
  8585.                   37   25   %      80   50   P     123   7B   {
  8586.                   38   26   &      81   51   Q     124   7C   |
  8587.                   39   27   '      82   52   R     125   7D   }
  8588.                   40   28   (      83   53   S     126   7E   ~
  8589.                   41   29   )      84   54   T     127   7F  DEL
  8590.                   42   2A   *      85   55   U
  8591.                           C Spot Run - Documentation
  8592.  
  8593.  
  8594.                         Appendix F - Window Border Styles
  8595.  
  8596.  
  8597.                                      Type 0
  8598.  
  8599.                                Borderless window.
  8600.  
  8601.                           Type 1                Type 2
  8602.  
  8603.                         +--------+            +========+
  8604.                         |        |            |        |
  8605.                         +--------+            :========:
  8606.                         |        |            |        |
  8607.                         +--------+            +========+
  8608.  
  8609.  
  8610.                           Type 3                Type 4
  8611.  
  8612.                         ++======++            ++------++
  8613.                         ||      ||            ||      ||
  8614.                         |:======:|            |+------+|
  8615.                         ||      ||            ||      ||
  8616.                         ++======++            ++------++
  8617.  
  8618.  
  8619.                                      Type 5
  8620.  
  8621.                     The actual plus and minus characters will
  8622.                   be used, resulting in a display identical to
  8623.                 the non graphic representation of type number 1.
  8624.  
  8625.  
  8626.                                Any Other Character
  8627.  
  8628.                    If any other character is used as the type
  8629.               argument, that character will be used for the border.
  8630.                           C Spot Run - Documentation
  8631.  
  8632.  
  8633.                               Quick Reference Chart
  8634.  
  8635.         Control-Break Routines
  8636.         ----------------------------------------
  8637.         cbcapt()       cbrest()
  8638.  
  8639.         Cursor Control Routines
  8640.         ----------------------------------------
  8641.         current_page() cursor_off()   cursor_on()    cursor_read()
  8642.         cursor_size()  gotoxy()       restore_cursor()
  8643.         save_cursor()
  8644.  
  8645.         Date Manipulation Routines
  8646.         ----------------------------------------
  8647.         chk_date()     date_sn()      day_of_year()  dt_diff()
  8648.         isleap()       month_day()    sn_date()      valid_date()
  8649.  
  8650.         Disk Drive Routines
  8651.         ----------------------------------------
  8652.         dirwin()       ffirst()       fnext()        get_drive()
  8653.         num_drives()   set_drive()
  8654.  
  8655.         Field Input Routines
  8656.         ----------------------------------------
  8657.         cfield()       fbreakon()     fchar()        fcolor()
  8658.         ffill()        finptint()     finptintd()    finptintr()
  8659.         finptintrd()   finptstr()     finptstrd()    finptstre()
  8660.         finptstred()   finptyn()      finptynd()
  8661.  
  8662.         Graphics Routines
  8663.         ----------------------------------------
  8664.         gback()        gbox()         gcircle()      gdot()
  8665.         gfbox()        ginit()        gline()        gpal()
  8666.  
  8667.         Input Routines
  8668.         ----------------------------------------
  8669.         inptint()      inptintd()     inptintr()     inptintrd()
  8670.         inptstr()      inptstrd()     inptyn()       inptynd()
  8671.  
  8672.         Menu Routines
  8673.         ----------------------------------------
  8674.         pmclose()      pmcolor()      pmfunc()       pmopen()
  8675.         pmrun()
  8676.  
  8677.         Miscellaneous Routines
  8678.         ----------------------------------------
  8679.         beep()         dosver()       getpw()        istemplate()
  8680.         itofa()        ltofa()        mcolor()       setbeep()
  8681.         soundex()      wait_hs()
  8682.  
  8683.         Printer Routines
  8684.         ----------------------------------------
  8685.         lprint()       lprintf()      lputchar()     print_screen()
  8686.         prtrns()
  8687.                           C Spot Run - Documentation
  8688.  
  8689.  
  8690.         Screen Control and Output Routines
  8691.         ----------------------------------------
  8692.         border()       box()          cbox()         ccenter()
  8693.         ccls()         ccputs()       center()       centerf()
  8694.         cfield()       chline()       clreol()       cls()
  8695.         cvline()       message()      mscroll()      pmenu()
  8696.         pop_menu()     putat()        putatf()       putchc()
  8697.         putchci()      restore()      restore_screen()
  8698.         save()         save_screen()  scroll()       set_mode()
  8699.         vidblt()
  8700.  
  8701.         Sound Routines
  8702.         ----------------------------------------
  8703.         play()         sndout()       sndrstint()    sndsetint()
  8704.         sound()        sound_done()   sound_init()   sound_left()
  8705.         sound_quiet()  spkr_freq()    spkr_off()     spkr_on()
  8706.  
  8707.         String Routines
  8708.         ----------------------------------------
  8709.         match()        soundex()      strcen()       strght()
  8710.         strlft()       strtrm()
  8711.  
  8712.         System Clock Routines
  8713.         ----------------------------------------
  8714.         get_date()     get_dow()      get_time()     set_date()
  8715.         set_time()
  8716.  
  8717.         Timer Routines
  8718.         ----------------------------------------
  8719.         get_timer()    init_tmr()     read_tmr()     reset_tmr()
  8720.         start_tmr()    stop_tmr()     timer()        zero_tmr()
  8721.  
  8722.         Window Routines
  8723.         ----------------------------------------
  8724.         cmenu()        color()        dma()          fixcolor()
  8725.         retrace()      wactivate()    wblank()       wborder()
  8726.         wcenter()      wcenterf()     wclose()       wcloseall()
  8727.         wcls()         wcol()         wcolor()       wdelete()
  8728.         wfreeze()      wgotoxy()      whline()       whome()
  8729.         winsert()      wjump()        wmessage()     wmove()
  8730.         wopen()        wprint()       wprintc()      wprintf()
  8731.         wputat()       wputatf()      wputchar()     wrow()
  8732.         wscolor()      wscroll()      wtitle()       wvline()
  8733.  
  8734.         Window Field Input Routines
  8735.         ----------------------------------------
  8736.         wfbreakon()    wfchar()       wfcolor()      wffill()
  8737.         wfinptint()    wfinptintd()   wfinptintr()   wfinptintrd()
  8738.         wfinptstr()    wfinptstrd()   wfinptstre()   wfinptstred()
  8739.         wfinptyn()     wfinptynd()
  8740.  
  8741.         Window Input Routines
  8742.         ----------------------------------------
  8743.         winptint()     winptintd()    winptintr()    winptintrd()
  8744.         winptstr()     winptstrd()    winptyn()      winptynd()
  8745.                           C Spot Run - Documentation
  8746.  
  8747.  
  8748.                       Commonly Asked Questions and Answers
  8749.  
  8750.              What  follows is a collection of some of the  most  commonly
  8751.         asked questions and their answers.  If you don't find the  answer
  8752.         to your particular problem here, please feel free to call.
  8753.  
  8754.              Q:   I want to use C Spot Run in an application I'm  writing
  8755.         to sell commercially.  What do I need to do?
  8756.  
  8757.              A:  You need to obtain a commercial license for C Spot  Run,
  8758.         which  costs  $75, and comply with the simple terms  in  the  CSR
  8759.         commercial usage license.  (Section 2.5 of this manual.)
  8760.  
  8761.  
  8762.              Q:  I want to use C Spot Run for an internal project  at  my
  8763.         company.  Does this constitute commercial use?
  8764.  
  8765.              A:  Yes.  Any use by a commercial organization whether for a
  8766.         marketed  product or an internal project  constitutes  commercial
  8767.         use.  Individuals and non-profit organizations are the only users
  8768.         who qualify for a personal license.
  8769.  
  8770.  
  8771.              Q:  I need a large model version of the library.  Where  can
  8772.         I get it?
  8773.  
  8774.              A:  The source code comes with a make file that allows users
  8775.         to  quickly recompile the source code for any memory  model  with
  8776.         both Microsoft C/QuickC and Turbo C.
  8777.  
  8778.  
  8779.              Q:  I use another C compiler; is there a CSR version for it?
  8780.  
  8781.              A:   C  Spot Run currently supports only the  Microsoft  and
  8782.         Borland compilers.  However you may find that your compiler links
  8783.         with Microsoft or Borland libraries, or you may wish to  purchase
  8784.         the  source code and recompile the library.  (The source code  is
  8785.         very  compiler independent.)  If enough requests are made on  the
  8786.         behalf  of a particular compiler CSR support may be  extended  to
  8787.         it.
  8788.  
  8789.  
  8790.  
  8791.                          Routine/Utility Submission Form
  8792.  
  8793.  
  8794.         Name of Routine/Utility: ___________________________________
  8795.  
  8796.         Form(s) of Submission (C/ASM/OBJ/LIB/EXE/COM): _____________
  8797.  
  8798.  
  8799.         Are you releasing this  routine/utility to the Pubic  Domain
  8800.  
  8801.         or under another program? (PD/Program):  ___________________
  8802.  
  8803.  
  8804.         If this  release is under a voluntary contribution  program,
  8805.  
  8806.         what is the suggested contribution? ($): ___________________
  8807.  
  8808.  
  8809.         May we put your address in the author directory? (Y/N): ____
  8810.  
  8811.                                       Your phone number? (Y/N): ____
  8812.  
  8813.                                       Your data address? (Y/N): ____
  8814.  
  8815.  
  8816.              Name: _________________________________
  8817.  
  8818.           Address: _________________________________
  8819.  
  8820.              City: _____________________ State: ____  ZIP: _________
  8821.  
  8822.             Phone: (    )     -          Hours: ____________________
  8823.  
  8824.         Source ID: _______________  CompuServe ID: _________________
  8825.  
  8826.            Data #: (    )     -          Hours: ____________________
  8827.  
  8828.          Fido Net: ____ /_____            Baud: ____________________
  8829.  
  8830.         In  submitting  this form you place  your routine or utility
  8831.         into the C Spot Run  C Add-on and Utility Library,  and give
  8832.         permission  for it's  use as  specified  in  Appendix  C and
  8833.         sections one  and two of this manual.
  8834.  
  8835.         Please send this form via US Mail to the following  address,
  8836.         or via modem to the accompanying FidoNet address.
  8837.  
  8838.         Don't forget the description sheets, and of course the files
  8839.         you are submitting!
  8840.  
  8841.              C Spot Run
  8842.              New Dimension Software   FidoNet 107/414
  8843.                23 Pawtucket Drive      Data: (609) 354-9259
  8844.                Cherry Hill, NJ 08003
  8845.  
  8846.  
  8847.  
  8848.                             User Response Form - V3.0
  8849.  
  8850.  
  8851.              We  would  like to hear from you,  and would appreciate  any
  8852.         comments,  suggestions,  and/or donations.   Even if you are  not
  8853.         making  a  donation  or contributing to  the  library,  we  would
  8854.         appreciate some input,  and it helps us to know if the library is
  8855.         serving  it's intended purpose,  and gives us some information on
  8856.         our  users.   Of course this is voluntary,  but we hope you  will
  8857.         take the time to fill out and mail this form.
  8858.  
  8859.         How did you obtain your copy of C Spot Run? ________________
  8860.  
  8861.         ____________________________________________________________
  8862.  
  8863.  
  8864.         What,  in your  opinion, are  the most  useful  routines and
  8865.  
  8866.         utilities? _________________________________________________
  8867.  
  8868.  
  8869.         What do you think of the documentation? ____________________
  8870.  
  8871.         ____________________________________________________________
  8872.  
  8873.  
  8874.         Are  you enclosing  a contribution, and  if so, how much and
  8875.  
  8876.         why? _______________________________________________________
  8877.  
  8878.  
  8879.         Do you have any comments and/or suggestions? _______________
  8880.  
  8881.         ____________________________________________________________
  8882.  
  8883.         ____________________________________________________________
  8884.  
  8885.  
  8886.         Would you  like to be on  the NDS mailing  list? (Y/N) _____
  8887.  
  8888.  
  8889.              Name: ________________________________________
  8890.  
  8891.           Company: ________________________________________
  8892.  
  8893.           Address: ________________________________________
  8894.  
  8895.              City: _____________________ State: ____  ZIP: _________
  8896.  
  8897.             Phone: (    )     -          Hours: ____________________
  8898.  
  8899.            Data #: (    )     -          Hours: ____________________
  8900.  
  8901.                                           Baud: ____________________
  8902.  
  8903.  
  8904.  
  8905.  
  8906.            Thank you, we hope you find the C Spot Run library of use.
  8907.  
  8908.         Please send this form via US Mail to the following  address,
  8909.         or via modem to the accompanying FidoNet address.
  8910.  
  8911.  
  8912.              C Spot Run
  8913.              New Dimension Software   FidoNet 107/414
  8914.                23 Pawtucket Drive      Data: (609) 354-9259
  8915.                Cherry Hill, NJ 08003
  8916.  
  8917.  
  8918.  
  8919.                                 Order Form - V3.0
  8920.  
  8921.              NOTE:   Users  who receive source code may not  redistribute
  8922.         it.  The code is for your use only, and the right to redistribute
  8923.         is  not included in the purchase.   If two or more people will be
  8924.         using  the  source,  rather  then ordering just one  copy  please
  8925.         contact   the  author  about  a  discount  on   several   copies.
  8926.         (International Users: Please make payment in U.S. dollars.)
  8927.  
  8928.  
  8929.              (  )  I would like to register as a C Spot Run User, receive
  8930.         complete source code on disk, update notifications, and be placed
  8931.         on whatever mailing list may be formed.  I am enclosing $50.
  8932.  
  8933.              (   )  I would like to register as a C Spot Run user with  a
  8934.         commercial   license,   receiving  all  the  benefits   of   full
  8935.         registration with permission to use C Spot Run commercially under
  8936.         the conditions set forth in section 2.5.  I am enclosing $75.
  8937.  
  8938.              (   )   I would like to register as a C Spot  Run  User  and
  8939.         receive all the benfits of such status with the exception of  the
  8940.         source code.  I am enclosing $15.
  8941.  
  8942.  
  8943.              Name: ________________________________________
  8944.  
  8945.           Company: ________________________________________
  8946.  
  8947.           Address: ________________________________________
  8948.  
  8949.              City: _____________________ State: ____  ZIP: _________
  8950.  
  8951.             Phone: (    )     -          Hours: ____________________
  8952.  
  8953.            Data #: (    )     -          Hours: ____________________
  8954.  
  8955.                                           Baud: ____________________
  8956.  
  8957.  
  8958.              C Spot Run
  8959.              New Dimension Software   Voice: (609) 424-2595
  8960.                23 Pawtucket Drive      Data: (609) 354-9259
  8961.                Cherry Hill, NJ 08003
  8962.  
  8963.  
  8964.  
  8965.            +--------------------  NDS USE ONLY  --------------------+
  8966.            |                                                        |
  8967.            |  Recieved:  ____ /____ /____   Sent: ____ /____ /____  |
  8968.            |                                                        |
  8969.            |             Serial Number: ________________            |
  8970.            |                                                        |
  8971.            +--------------------------------------------------------+
  8972.  
  8973.